mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 68426: Refactored some cgroups helpers to do verify from callers.
Date Wed, 05 Sep 2018 20:56:07 GMT

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



For posterity, numbers with --enabled-optimize:

```
Before Fix:
Prepared mount 'Took 55.044348852secs to launch 1000 containers
Took 52.265658534secs to destroy 1000 containers

After Fix:
Took 30.683818359secs to launch 1000 containers
Took 22.182255592secs to destroy 1000 containers
```

- Benjamin Mahler


On Aug. 20, 2018, 4:46 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68426/
> -----------------------------------------------------------
> 
> (Updated Aug. 20, 2018, 4:46 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gilbert Song, and James Peach.
> 
> 
> Bugs: MESOS-8418 and MESOS-9081
>     https://issues.apache.org/jira/browse/MESOS-8418
>     https://issues.apache.org/jira/browse/MESOS-9081
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Prior to this patch, some of the cgroups helpers call `cgroups::verify`
> to make sure the hierarchy and cgroup are valid. This causes some
> performance issues for the agent because `cgroups::verify` will read the
> entire mount table, and mount table read is expensive if the mount table
> is large. See more details in MESOS-8418.
> 
> In most of the cases, the verification has already been done when those
> cgroups helpers are called. Therefore, it is better to let the caller do
> the verification and make those cgroups helpers pure helpers.
> 
> Also, the verification is subject to race anyway. The cgroups global
> state might change (e.g., operators modify the cgroups) after the
> verification is done, making the verification itself not that super
> useful.
> 
> This patch refactored the cgroups helpers and moved the verifications to
> the callers.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 282b8e783e8c70742e4388a19003382bc57db8d5 
>   src/linux/cgroups.cpp 86b0306eee804732a55041d2d82c14db35ec5095 
>   src/linux/systemd.cpp 2444ff4e432e61071c62e8e1ee94d62ac6b96c88 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 1444c0543540cf61e253579e9e49d8687bd4ed3a

>   src/slave/containerizer/mesos/isolators/cgroups/subsystems/cpu.cpp 321671f18b72edec1f8ed00f0069b539a698c4af

>   src/slave/containerizer/mesos/isolators/gpu/isolator.cpp d84f78c99eb118eba1a5bc3e74a2cf57556a325a

>   src/slave/containerizer/mesos/linux_launcher.cpp e51352af12743cc35f09b9fbb7d770f0108f908c

>   src/slave/main.cpp 489e87522588be259d382f588b66907ba29f1788 
>   src/tests/containerizer/nested_mesos_containerizer_tests.cpp b80e40b6f4b18e076ebb3c1668f475286c337127

> 
> 
> Diff: https://reviews.apache.org/r/68426/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> I also used the benchmark I developed in https://reviews.apache.org/r/68266/ to see the
speedup
> 
> Before the patch
> Took 56.xxx secs to launch 1000 containers
> Took 55.xxx secs to destroy 1000 containers
> 
> After the patch
> Took 37.xxx secs to launch 1000 containers
> Took 26.xxx secs to destroy 1000 containers
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message