You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Anton Lindström <an...@alley.se> on 2014/08/08 12:42:25 UTC

Re: Review Request 24316: Use memory.memsw.limit_in_bytes in cgroup mem isolator with --cgroups_limit-swap

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24316/
-----------------------------------------------------------

(Updated Aug. 8, 2014, 10:42 a.m.)


Review request for mesos.


Summary (updated)
-----------------

Use memory.memsw.limit_in_bytes in cgroup mem isolator with --cgroups_limit-swap


Bugs: MESOS-1662
    https://issues.apache.org/jira/browse/MESOS-1662


Repository: mesos-git


Description
-------

Changed memory.limit_in_bytes to memory.memsw.limit_in_bytes where memory is limited. This makes Mesos limit both memory and swap as described in the Jira ticket.

Using --limit-swap, it's possible to use memory.memsw.limit_in_bytes. If it doesn't exist it will fallback on memory.limit_in_bytes.


Diffs
-----

  src/linux/cgroups.hpp 9dfba6eb9059728386d053f8c2e92edab0caa295 
  src/linux/cgroups.cpp 39a4874ee0030110d7a61f1b73653af116d66549 
  src/slave/containerizer/isolators/cgroups/mem.hpp 6869ed4a9fa9a1a719e695ac83aeec88ead0efc0 
  src/slave/containerizer/isolators/cgroups/mem.cpp e8160efc4f5baa06470a8a3c774bf97d5b9e83cc 
  src/slave/flags.hpp 841de2364085c66e4272734d5b11dbf8efa845a5 

Diff: https://reviews.apache.org/r/24316/diff/


Testing
-------

make check


Thanks,

Anton Lindström


Re: Review Request 24316: Use memory.memsw.limit_in_bytes in cgroup mem isolator with --cgroups_limit-swap

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24316/#review50129
-----------------------------------------------------------


I've committed this patch. Please mark it as submitted.

- Jie Yu


On Aug. 10, 2014, 11:55 a.m., Anton Lindström wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24316/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2014, 11:55 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-1662
>     https://issues.apache.org/jira/browse/MESOS-1662
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Changed memory.limit_in_bytes to memory.memsw.limit_in_bytes where memory is limited. This makes Mesos limit both memory and swap as described in the Jira ticket.
> 
> Using --limit-swap, it's possible to use memory.memsw.limit_in_bytes. If it doesn't exist it will fallback on memory.limit_in_bytes.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 26dcb3d8c948bd4b3f203f0fc4dd415f5697980f 
>   src/linux/cgroups.cpp 47be0eff4ae1119c2da21e557e512e158b2afae0 
>   src/slave/containerizer/isolators/cgroups/mem.hpp 6869ed4a9fa9a1a719e695ac83aeec88ead0efc0 
>   src/slave/containerizer/isolators/cgroups/mem.cpp e8160efc4f5baa06470a8a3c774bf97d5b9e83cc 
>   src/slave/flags.hpp 841de2364085c66e4272734d5b11dbf8efa845a5 
> 
> Diff: https://reviews.apache.org/r/24316/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anton Lindström
> 
>


Re: Review Request 24316: Use memory.memsw.limit_in_bytes in cgroup mem isolator with --cgroups_limit-swap

Posted by Anton Lindström <an...@alley.se>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24316/
-----------------------------------------------------------

(Updated Aug. 10, 2014, 11:55 a.m.)


Review request for mesos.


Changes
-------

Updated based on comments and have run tests successfully on a machine with memsw. 

Let me know if there's anything else. Thank you so much for all the help!


Bugs: MESOS-1662
    https://issues.apache.org/jira/browse/MESOS-1662


Repository: mesos-git


Description
-------

Changed memory.limit_in_bytes to memory.memsw.limit_in_bytes where memory is limited. This makes Mesos limit both memory and swap as described in the Jira ticket.

Using --limit-swap, it's possible to use memory.memsw.limit_in_bytes. If it doesn't exist it will fallback on memory.limit_in_bytes.


Diffs (updated)
-----

  src/linux/cgroups.hpp 26dcb3d8c948bd4b3f203f0fc4dd415f5697980f 
  src/linux/cgroups.cpp 47be0eff4ae1119c2da21e557e512e158b2afae0 
  src/slave/containerizer/isolators/cgroups/mem.hpp 6869ed4a9fa9a1a719e695ac83aeec88ead0efc0 
  src/slave/containerizer/isolators/cgroups/mem.cpp e8160efc4f5baa06470a8a3c774bf97d5b9e83cc 
  src/slave/flags.hpp 841de2364085c66e4272734d5b11dbf8efa845a5 

Diff: https://reviews.apache.org/r/24316/diff/


Testing
-------

make check


Thanks,

Anton Lindström


Re: Review Request 24316: Use memory.memsw.limit_in_bytes in cgroup mem isolator with --cgroups_limit-swap

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24316/#review50039
-----------------------------------------------------------


Looks good! Can you do me one favor, can you test it on a machine with memsw turned on and run out tests with --cgroups_limit_swap set to true?


src/slave/containerizer/isolators/cgroups/mem.hpp
<https://reviews.apache.org/r/24316/#comment87550>

    We don't use const ref for primitive types
    
    s/const bool&/bool/



src/slave/containerizer/isolators/cgroups/mem.cpp
<https://reviews.apache.org/r/24316/#comment87551>

    indent 2 spaces please.


- Jie Yu


On Aug. 8, 2014, 10:42 a.m., Anton Lindström wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24316/
> -----------------------------------------------------------
> 
> (Updated Aug. 8, 2014, 10:42 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-1662
>     https://issues.apache.org/jira/browse/MESOS-1662
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Changed memory.limit_in_bytes to memory.memsw.limit_in_bytes where memory is limited. This makes Mesos limit both memory and swap as described in the Jira ticket.
> 
> Using --limit-swap, it's possible to use memory.memsw.limit_in_bytes. If it doesn't exist it will fallback on memory.limit_in_bytes.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 9dfba6eb9059728386d053f8c2e92edab0caa295 
>   src/linux/cgroups.cpp 39a4874ee0030110d7a61f1b73653af116d66549 
>   src/slave/containerizer/isolators/cgroups/mem.hpp 6869ed4a9fa9a1a719e695ac83aeec88ead0efc0 
>   src/slave/containerizer/isolators/cgroups/mem.cpp e8160efc4f5baa06470a8a3c774bf97d5b9e83cc 
>   src/slave/flags.hpp 841de2364085c66e4272734d5b11dbf8efa845a5 
> 
> Diff: https://reviews.apache.org/r/24316/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anton Lindström
> 
>