You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Ian Downes <ia...@gmail.com> on 2014/05/01 20:42:37 UTC

Review Request 20963: Add a cgroup perf_event isolator.

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

Review request for mesos and Benjamin Hindman.


Repository: mesos-git


Description
-------

This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.

NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.


Diffs
-----

  src/Makefile.am f461a1515e7bafac677f2d0bcdd499f57ba3f029 
  src/slave/containerizer/containerizer.cpp 374a778e62321dfb57c2ad19a3614154596f4b9f 
  src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
  src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 

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


Testing
-------

Manually tested.

Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.


Thanks,

Ian Downes


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/#review44325
-----------------------------------------------------------


Patch looks great!

Reviews applied: [20963]

All tests passed.

- Mesos ReviewBot


On May 29, 2014, 10:08 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20963/
> -----------------------------------------------------------
> 
> (Updated May 29, 2014, 10:08 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.
> 
> NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am ffde59be8683dd40cc5bc7cb88cd88c5bc91cf96 
>   src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
>   src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20963/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/#review45542
-----------------------------------------------------------

Ship it!


Ship It!

- Vinod Kone


On June 12, 2014, 9:50 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20963/
> -----------------------------------------------------------
> 
> (Updated June 12, 2014, 9:50 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.
> 
> NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 4a3f2e12643a1f02284587ebcbe9374f416b3d60 
>   src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
>   src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20963/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/
-----------------------------------------------------------

(Updated June 12, 2014, 9:50 p.m.)


Review request for mesos and Vinod Kone.


Changes
-------

i'll shepherd this -- vinod.


Repository: mesos-git


Description
-------

This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.

NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.


Diffs
-----

  src/Makefile.am 4a3f2e12643a1f02284587ebcbe9374f416b3d60 
  src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
  src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 

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


Testing
-------

Manually tested.

Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.


Thanks,

Ian Downes


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/#review45062
-----------------------------------------------------------


Patch looks great!

Reviews applied: [20963]

All tests passed.

- Mesos ReviewBot


On June 9, 2014, 5:08 a.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20963/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 5:08 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.
> 
> NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 4a3f2e12643a1f02284587ebcbe9374f416b3d60 
>   src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
>   src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20963/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/
-----------------------------------------------------------

(Updated June 8, 2014, 10:08 p.m.)


Review request for mesos and Benjamin Hindman.


Changes
-------

Rebased. NNTR.


Repository: mesos-git


Description
-------

This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.

NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.


Diffs (updated)
-----

  src/Makefile.am 4a3f2e12643a1f02284587ebcbe9374f416b3d60 
  src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
  src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 

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


Testing
-------

Manually tested.

Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.


Thanks,

Ian Downes


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/
-----------------------------------------------------------

(Updated May 29, 2014, 3:08 p.m.)


Review request for mesos and Benjamin Hindman.


Repository: mesos-git


Description
-------

This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.

NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.


Diffs (updated)
-----

  src/Makefile.am ffde59be8683dd40cc5bc7cb88cd88c5bc91cf96 
  src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
  src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 

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


Testing
-------

Manually tested.

Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.


Thanks,

Ian Downes


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/#review42117
-----------------------------------------------------------


Bad patch!

Reviews applied: [20963]

Failed command: git apply --index 20963.patch

Error:
 error: patch failed: src/slave/containerizer/containerizer.cpp:44
error: src/slave/containerizer/containerizer.cpp: patch does not apply
20963.patch:146: new blank line at EOF.
+


- Mesos ReviewBot


On May 1, 2014, 6:42 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20963/
> -----------------------------------------------------------
> 
> (Updated May 1, 2014, 6:42 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.
> 
> NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am f461a1515e7bafac677f2d0bcdd499f57ba3f029 
>   src/slave/containerizer/containerizer.cpp 374a778e62321dfb57c2ad19a3614154596f4b9f 
>   src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
>   src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20963/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/#review42082
-----------------------------------------------------------

Ship it!


Seems like one could pretty easily create a "generic" isolator for cgroup things that you get once you've mounted a subsystem in a hierarchy and assigned a pid to a cgroup in that hierarchy so that in the future one could just do:

GenericCgroupIsolator isolator("perf_event");

Not sure how many more 'perf_event' like things there are, but that might be useful if there are a handful. Maybe a TODO for posterity?


src/slave/containerizer/isolators/cgroups/perf_event.hpp
<https://reviews.apache.org/r/20963/#comment75827>

    We don't use these two, so let's not save them!



src/slave/containerizer/isolators/cgroups/perf_event.hpp
<https://reviews.apache.org/r/20963/#comment75829>

    Kill newline. ;-)



src/slave/containerizer/isolators/cgroups/perf_event.cpp
<https://reviews.apache.org/r/20963/#comment75828>

    Just return an always pending future!


- Benjamin Hindman


On May 1, 2014, 6:42 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20963/
> -----------------------------------------------------------
> 
> (Updated May 1, 2014, 6:42 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.
> 
> NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am f461a1515e7bafac677f2d0bcdd499f57ba3f029 
>   src/slave/containerizer/containerizer.cpp 374a778e62321dfb57c2ad19a3614154596f4b9f 
>   src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
>   src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20963/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20963: Add a cgroup perf_event isolator.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20963/#review43000
-----------------------------------------------------------

Ship it!



src/slave/containerizer/isolators/cgroups/perf_event.cpp
<https://reviews.apache.org/r/20963/#comment76985>

    Can you pull this down after if (!exists.get()) to be consistent with how we did for other isolators? I guess the only difference between other isolators and this one will be the absence of 'continue' inside the if (!exists.get()).



src/slave/containerizer/isolators/cgroups/perf_event.cpp
<https://reviews.apache.org/r/20963/#comment76987>

    can you print the cgroup name too?


- Vinod Kone


On May 1, 2014, 6:42 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20963/
> -----------------------------------------------------------
> 
> (Updated May 1, 2014, 6:42 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This isolator only creates the perf_event cgroup and places the executor into the cgroup; no performance statistics are gathered/exported.
> 
> NOTE: The recover() as implemented is "non-strict"; it will happily recover containers even if they don't have a perf_event cgroup present. This permits restarting the slave to add this isolator. Existing containers will not be isolated. New containers will be isolated.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am f461a1515e7bafac677f2d0bcdd499f57ba3f029 
>   src/slave/containerizer/containerizer.cpp 374a778e62321dfb57c2ad19a3614154596f4b9f 
>   src/slave/containerizer/isolators/cgroups/perf_event.hpp PRE-CREATION 
>   src/slave/containerizer/isolators/cgroups/perf_event.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20963/diff/
> 
> 
> Testing
> -------
> 
> Manually tested.
> 
> Our current testing code does not easily permit testing different combinations of isolators for the MesosContainerizer.
> 
> 
> Thanks,
> 
> Ian Downes
> 
>