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:57 UTC

[mesos] branch 1.6.x updated (0811a8d -> 1501dca)

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

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


    from 0811a8d  Added MESOS-9267 to 1.6.2 CHANGELOG.
     new f2018e9  Cached the cgroup results in Docker containerizer.
     new 1501dca  Added MESOS-9279 to 1.6.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] 02/02: Added MESOS-9279 to 1.6.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.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 1501dca403d41eeb82a95ccc1a35983ba0ee9921
Author: Jie Yu <yu...@gmail.com>
AuthorDate: Fri Sep 28 16:59:47 2018 -0700

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

diff --git a/CHANGELOG b/CHANGELOG
index d3fc60b..be3a5ab 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -20,6 +20,7 @@ Release Notes - Mesos - Version 1.6.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.6.1


[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.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit f2018e95782884a6fa7b0629275aa7fe9fde9541
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 7171cb5..94c30d9 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -2053,8 +2053,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
@@ -2129,7 +2129,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(