You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2016/04/09 01:52:09 UTC

[5/6] mesos git commit: Add XFS disk isolator documentation.

Add XFS disk isolator documentation.

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


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

Branch: refs/heads/master
Commit: b900abff1648ae397d9819322de95ad99737ce4d
Parents: 255710b
Author: James Peach <jp...@apache.org>
Authored: Fri Apr 8 14:56:12 2016 -0700
Committer: Jiang Yan Xu <ya...@jxu.me>
Committed: Fri Apr 8 16:46:08 2016 -0700

----------------------------------------------------------------------
 CHANGELOG                   |  4 ++++
 docs/configuration.md       | 25 +++++++++++++++++++++++
 docs/mesos-containerizer.md | 43 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 72 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b900abff/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 4337490..1f0527e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -27,6 +27,10 @@ This release contains the following new features:
     `mesos.scheduler`. `mesos.native` still exists, combining both modules for
     backwards compatibility with existing code.
 
+  * [MESOS-4828] - **Experimental** support for a new `xfs/disk' isolator
+    has been added to isolate disk resources more efficiently. Please refer to
+    docs/mesos-containerizer.md for more details.
+
 Deprecations:
   * [MESOS-2281] - Deprecated the plain text format for credentials in favor of
     the JSON format.

http://git-wip-us.apache.org/repos/asf/mesos/blob/b900abff/docs/configuration.md
----------------------------------------------------------------------
diff --git a/docs/configuration.md b/docs/configuration.md
index 309a5a0..ba00ec5 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1725,6 +1725,31 @@ isolator. (default: false)
 </tr>
 </table>
 
+*XFS disk isolator flags available when configured with
+`--enable-xfs-disk-isolator`*
+
+<table class="table table-striped">
+  <thead>
+    <tr>
+      <th width="30%">
+        Flag
+      </th>
+      <th>
+        Explanation
+      </th>
+    </tr>
+  </thead>
+<tr>
+  <td>
+    --xfs_project_range=VALUE
+  </td>
+<td>
+The ranges of XFS project IDs that the isolator can use to track disk
+quotas for container sandbox directories. Valid project IDs range from
+1 to max(uint32). (default `[5000-10000]`)
+</td>
+</tr>
+</table>
 
 ## Libprocess Options
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b900abff/docs/mesos-containerizer.md
----------------------------------------------------------------------
diff --git a/docs/mesos-containerizer.md b/docs/mesos-containerizer.md
index 2fde743..6f40c57 100644
--- a/docs/mesos-containerizer.md
+++ b/docs/mesos-containerizer.md
@@ -85,6 +85,49 @@ The interval between two `du`s can be controlled by the slave flag
 minute. The default interval is 15 seconds.
 
 
+### XFS Disk Isolator
+
+The XFS Disk isolator uses XFS project quotas to track the disk
+space used by each container sandbox and to enforce the corresponding
+disk space allocation. Write operations performed by tasks exceeding
+their disk allocation will fail with an `EDQUOT` error. The task
+will not be terminated by the containerizer.
+
+The XFS disk isolator is functionally similar to Posix Disk isolator
+but avoids the cost of repeatedly running the `du`.  Though they will
+not interfere with each other, it is not recommended to use them together.
+
+To enable the XFS Disk isolator, append `xfs/disk` to the
+`--isolation` flag when starting the slave.
+
+The XFS Disk isolator requires the sandbox directory to be located
+on an XFS filesystem that is mounted with the `pquota` option. There
+is no need to configure
+[projects](http://man7.org/linux/man-pages/man5/projects.5.html)
+or [projid](http://man7.org/linux/man-pages/man5/projid.5.html)
+files. The range of project IDs given to the `--xfs_project_range`
+must not overlap any project IDs allocated for other uses.
+
+The XFS disk isolator does not natively support an accounting-only mode
+like that of the Posix Disk isolator. Quota enforcement can be disabled
+by mounting the filesystem with the `pqnoenforce` mount option.
+
+The [xfs_quota](http://man7.org/linux/man-pages/man8/xfs_quota.8.html)
+command can be used to show the current allocation of project IDs
+and quota. For example:
+
+    $ xfs_quota -x -c "report -a -n -L 5000 -U 1000"
+
+To show which project a file belongs to, use the
+[xfs_io](http://man7.org/linux/man-pages/man8/xfs_io.8.html) command
+to display the `fsxattr.projid` field. For example:
+
+    $ xfs_io -r -c stat /mnt/mesos/
+
+Note that the Posix Disk isolator flags `--enforce_container_disk_quota`,
+`--container_disk_watch_interval` and `--enforce_container_disk_quota` do
+not apply to the XFS Disk isolator.
+
 ### Docker Runtime Isolator
 
 The Docker Runtime isolator is used for supporting runtime