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:02:05 UTC

[mesos] branch 1.7.x updated (ceae358 -> 4aa7e6b)

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

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


    from ceae358  Added MESOS-9267 to 1.7.1 CHANGELOG.
     new 8a6059d  Cached the cgroup results in Docker containerizer.
     new 4aa7e6b  Added MESOS-9279 to 1.7.1 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.7.1 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.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 4aa7e6bfcafc0cfe2b4731a155ca4868cd715e90
Author: Jie Yu <yu...@gmail.com>
AuthorDate: Fri Sep 28 16:59:21 2018 -0700

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

diff --git a/CHANGELOG b/CHANGELOG
index 9b36f8b..ac5ea06 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -11,6 +11,7 @@ Release Notes - Mesos - Version 1.7.1 (WIP)
   * [MESOS-9131] - Health checks launching nested containers while a container is being destroyed lead to unkillable tasks.
   * [MESOS-9228] - SLRP does not clean up plugin containers after it is removed.
   * [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.
 
 ** Improvement:
   * [MESOS-9239] - Improve sorting performance in the DRF sorter.


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

commit 8a6059de8c02859e2a55564a2544a67d8a62b6f2
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 277a155..aa1f6cc 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -2068,8 +2068,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
@@ -2144,7 +2144,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(