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 2015/02/24 20:53:39 UTC

mesos git commit: Added user doc for the posix disk isolator.

Repository: mesos
Updated Branches:
  refs/heads/master 74bff1239 -> 63a18e451


Added user doc for the posix disk isolator.

Review: https://reviews.apache.org/r/31336


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/63a18e45
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/63a18e45
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/63a18e45

Branch: refs/heads/master
Commit: 63a18e4519c3d8efdd9b61979c43874ecd09ef24
Parents: 74bff12
Author: Jie Yu <yu...@gmail.com>
Authored: Mon Feb 23 17:12:45 2015 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Feb 24 11:53:26 2015 -0800

----------------------------------------------------------------------
 docs/mesos-containerizer.md | 22 ++++++++++++++++++++++
 src/slave/flags.hpp         |  2 ++
 2 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/63a18e45/docs/mesos-containerizer.md
----------------------------------------------------------------------
diff --git a/docs/mesos-containerizer.md b/docs/mesos-containerizer.md
index f6cbb86..2206a61 100644
--- a/docs/mesos-containerizer.md
+++ b/docs/mesos-containerizer.md
@@ -58,3 +58,25 @@ to freezing cgroups under OOM conditions.
 
 /proc will be mounted for containers so tools such as 'ps' will work
 correctly.
+
+
+### Posix Disk Isolator
+
+The Posix Disk isolator provides basic disk isolation. It is able to
+report the disk usage for each sandbox and optionally enforce the disk
+quota. It can be used on both Linux and OS X.
+
+To enable the Posix Disk isolator, append `posix/disk` to the
+`--isolation` flag when start the slave.
+
+By default, the disk quota enforcement is disabled. To enable it,
+specify `--enforce_container_disk_quota` when start the slave.
+
+The Posix Disk isolator reports disk usage for each sandbox by
+periodically running the `du` command. The disk usage can be retrieved
+from the resource statistics endpoint (`/monitor/statistics.json`).
+
+The interval between two `du`s can be controlled by slave flag
+`--container_disk_watch_interval`. For example,
+`--container_disk_watch_interval=1mins` set the interval to be 1
+minute. The default interval is 15 seconds.

http://git-wip-us.apache.org/repos/asf/mesos/blob/63a18e45/src/slave/flags.hpp
----------------------------------------------------------------------
diff --git a/src/slave/flags.hpp b/src/slave/flags.hpp
index 0af7fe2..56b25ca 100644
--- a/src/slave/flags.hpp
+++ b/src/slave/flags.hpp
@@ -390,6 +390,8 @@ public:
         "used for the 'posix/disk' isolator.",
         Seconds(15));
 
+    // TODO(jieyu): Consider enabling this flag by default. Remember
+    // to update the user doc if we decide to do so.
     add(&Flags::enforce_container_disk_quota,
         "enforce_container_disk_quota",
         "Whether to enable disk quota enforcement for containers. This flag\n"