You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2018/09/29 00:01:44 UTC

[mesos] branch 1.5.x updated (1046ea8 -> 4010b2d)

This is an automated email from the ASF dual-hosted git repository.

jieyu pushed a change to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from 1046ea8  Added MESOS-9267 to 1.5.2 CHANGELOG.
     new 5969ec2  Cached the cgroup results in Docker containerizer.
     new 4010b2d  Added MESOS-9279 to 1.5.2 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG                          | 1 +
 src/slave/containerizer/docker.cpp | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)


[mesos] 01/02: Cached the cgroup results in Docker containerizer.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jieyu pushed a commit to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 5969ec296221a25af1244b5ff660ee1d4205c244
Author: Jie Yu <yu...@gmail.com>
AuthorDate: Fri Sep 28 15:55:59 2018 -0700

    Cached the cgroup results in Docker containerizer.
    
    Since the cgroup hierarchy results won't change, it does not make sense
    to compute it every time `usage` is called. It will get quite expensivie
    when the host mount table is big (e.g., MESOS-8418).
    
    This patch uses the static local variable to cache the result.
    
    Review: https://reviews.apache.org/r/68880
    (cherry picked from commit 59b92a948fab386542f5ddfee275066694cf1f96)
---
 src/slave/containerizer/docker.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 9d425e0..be54f57 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -2048,8 +2048,8 @@ Try<ResourceStatistics> DockerContainerizerProcess::cgroupsStatistics(
 #ifndef __linux__
   return Error("Does not support cgroups on non-linux platform");
 #else
-  const Result<string> cpuacctHierarchy = cgroups::hierarchy("cpuacct");
-  const Result<string> memHierarchy = cgroups::hierarchy("memory");
+  static const Result<string> cpuacctHierarchy = cgroups::hierarchy("cpuacct");
+  static const Result<string> memHierarchy = cgroups::hierarchy("memory");
 
   // NOTE: Normally, a Docker container should be in its own cgroup.
   // However, a zombie process (exited but not reaped) will be
@@ -2124,7 +2124,7 @@ Try<ResourceStatistics> DockerContainerizerProcess::cgroupsStatistics(
 
   // Add the cpu.stat information only if CFS is enabled.
   if (flags.cgroups_enable_cfs) {
-    const Result<string> cpuHierarchy = cgroups::hierarchy("cpu");
+    static const Result<string> cpuHierarchy = cgroups::hierarchy("cpu");
 
     if (cpuHierarchy.isError()) {
       return Error(


[mesos] 02/02: Added MESOS-9279 to 1.5.2 CHANGELOG.

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jieyu pushed a commit to branch 1.5.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 4010b2d220fc2c6f5a64826bfe273fd2a57a4b66
Author: Jie Yu <yu...@gmail.com>
AuthorDate: Fri Sep 28 16:59:57 2018 -0700

    Added MESOS-9279 to 1.5.2 CHANGELOG.
    
    (cherry picked from commit bf833e05b4a709d1074f5625d0aac384ad7971a5)
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index 1b1be09..68b6335 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -37,6 +37,7 @@ Release Notes - Mesos - Version 1.5.2 (WIP)
   * [MESOS-9170] - Zookeeper doesn't compile with newer gcc due to format error.
   * [MESOS-9196] - Removing rootfs mounts may fail with EBUSY.
   * [MESOS-9267] - Mesos agent crashes when CNI network is not configured but used.
+  * [MESOS-9279] - Docker Containerizer 'usage' call might be expensive if mount table is big.
 
 
 Release Notes - Mesos - Version 1.5.1