You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2017/10/13 01:20:25 UTC
[1/2] mesos git commit: Added documentation for the `cgroups/blkio`
isolator.
Repository: mesos
Updated Branches:
refs/heads/master 8186f032d -> 81704bd01
Added documentation for the `cgroups/blkio` isolator.
Review: https://reviews.apache.org/r/62961/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/81704bd0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/81704bd0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/81704bd0
Branch: refs/heads/master
Commit: 81704bd017f1ba3c1d5154ba3eee22226d5c9115
Parents: ca69c77
Author: Jason Lai <ja...@jasonlai.net>
Authored: Thu Oct 12 18:09:30 2017 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Thu Oct 12 18:19:59 2017 -0700
----------------------------------------------------------------------
docs/isolators/cgroups-blkio.md | 183 +++++++++++++++++++++++++++++++++++
docs/mesos-containerizer.md | 2 +-
2 files changed, 184 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/81704bd0/docs/isolators/cgroups-blkio.md
----------------------------------------------------------------------
diff --git a/docs/isolators/cgroups-blkio.md b/docs/isolators/cgroups-blkio.md
new file mode 100644
index 0000000..81706b4
--- /dev/null
+++ b/docs/isolators/cgroups-blkio.md
@@ -0,0 +1,183 @@
+---
+title: Apache Mesos - Cgroups 'blkio' Subsystem Support in Mesos Containerizer
+layout: documentation
+---
+
+# Cgroups 'blkio' Subsystem Support in Mesos Containerizer
+
+The `cgroups/blkio` isolator provides block I/O performance isolation for
+containers through [the *blkio* Linux cgroup subsystem](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt).
+To enable the isolator, append `cgroups/blkio` to the `--isolation` flag before
+starting the agent.
+
+The blkio subsystem enables I/O statistics collection and allows operators to
+apply I/O control policies for block devices. The isolator places the processes
+of a Mesos container into a separate blkio cgroup hierarchy. At the moment,
+it only supports reporting containers' I/O statistics on block devices to
+the agent. A sample statistics would be something like:
+
+```
+[{
+ "executor_id": "executor",
+ "executor_name": "name",
+ "framework_id": "framework",
+ "source": "source",
+ "statistics": {
+ "blkio": {
+ "cfq": [
+ {
+ "io_merged": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_queued": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_service_bytes": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_service_time": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_serviced": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_wait_time": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ]
+ }
+ ],
+ "cfq_recursive": [
+ {
+ "io_merged": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_queued": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_service_bytes": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_service_time": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_serviced": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ],
+ "io_wait_time": [
+ {
+ "op": "TOTAL",
+ "value": 0
+ }
+ ]
+ }
+ ],
+ "throttling": [
+ {
+ "device": {
+ "major": 8,
+ "minor": 0
+ },
+ "io_service_bytes": [
+ {
+ "op": "READ",
+ "value": 0
+ },
+ {
+ "op": "WRITE",
+ "value": 4096
+ },
+ {
+ "op": "SYNC",
+ "value": 0
+ },
+ {
+ "op": "ASYNC",
+ "value": 4096
+ },
+ {
+ "op": "TOTAL",
+ "value": 4096
+ }
+ ],
+ "io_serviced": [
+ {
+ "op": "READ",
+ "value": 0
+ },
+ {
+ "op": "WRITE",
+ "value": 1
+ },
+ {
+ "op": "SYNC",
+ "value": 0
+ },
+ {
+ "op": "ASYNC",
+ "value": 1
+ },
+ {
+ "op": "TOTAL",
+ "value": 1
+ }
+ ]
+ },
+ {
+ "io_service_bytes": [
+ {
+ "op": "TOTAL",
+ "value": 4096
+ }
+ ],
+ "io_serviced": [
+ {
+ "op": "TOTAL",
+ "value": 1
+ }
+ ]
+ }
+ ]
+ },
+ "cpus_limit": 1.1,
+ "mem_limit_bytes": 167772160,
+ "timestamp": 1500335339.30187
+ }
+}]
+```
+
+For more details about the blkio subsystem, please refer to
+the [Block I/O Controller](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt)
+Linux kernel documentation.
http://git-wip-us.apache.org/repos/asf/mesos/blob/81704bd0/docs/mesos-containerizer.md
----------------------------------------------------------------------
diff --git a/docs/mesos-containerizer.md b/docs/mesos-containerizer.md
index 4c82474..9cb0712 100644
--- a/docs/mesos-containerizer.md
+++ b/docs/mesos-containerizer.md
@@ -28,7 +28,7 @@ Mesos supports the following built-in isolators.
- [environment\_secret](secrets.md#environment-based-secrets)
- appc/runtime
-- cgroups/blkio
+- [cgroups/blkio](isolators/cgroups-blkio.md)
- [cgroups/cpu](isolators/cgroups-cpu.md)
- cgroups/cpuset
- cgroups/devices
[2/2] mesos git commit: Added Linux Namespaces semantic doc.
Posted by gi...@apache.org.
Added Linux Namespaces semantic doc.
This patch adds a table showing the current semantics
that the linux launcher supports namespaces for top
level and nested container.
Review: https://reviews.apache.org/r/54073/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ca69c77f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ca69c77f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ca69c77f
Branch: refs/heads/master
Commit: ca69c77fc49903d7c913b0b5cd6198f811636253
Parents: 8186f03
Author: Gilbert Song <so...@gmail.com>
Authored: Thu Oct 12 17:15:12 2017 -0700
Committer: Gilbert Song <so...@gmail.com>
Committed: Thu Oct 12 18:19:59 2017 -0700
----------------------------------------------------------------------
docs/containerizer-internals.md | 59 +++++++++++++++++++++++++++++++++---
1 file changed, 55 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/ca69c77f/docs/containerizer-internals.md
----------------------------------------------------------------------
diff --git a/docs/containerizer-internals.md b/docs/containerizer-internals.md
index 5e4f349..63bc8e6 100644
--- a/docs/containerizer-internals.md
+++ b/docs/containerizer-internals.md
@@ -114,14 +114,65 @@ Launcher is responsible for forking/destroying containers.
* Signals the child process to continue (exec'ing) by writing a
character to the write end of the pipe in the parent process.
+Starting from Mesos 1.1.0, [nested container](nested-container-and-task-group.md)
+is supported. The Linux Launcher is responsible to fork the subprocess
+for the nested container with appropriate Linux namespaces being
+cloned. The following is the table for Linux namespaces that
+are supported for top level and nested containers.
+
+###### Linux Namespaces
+
+<table class="table table-striped">
+ <tr>
+ <th>Linux Namespaces</th>
+ <th>Top Level Container</th>
+ <th>Nested Container</th>
+ </tr>
+ <tr>
+ <td>Mount</td>
+ <td>Not shared</td>
+ <td>Not shared</td>
+ </tr>
+ <tr>
+ <td>PID</td>
+ <td>Configurable</td>
+ <td>Configurable</td>
+ </tr>
+ <tr>
+ <td>Network & UTS</td>
+ <td>Configurable</td>
+ <td>Shared w/ parent</td>
+ </tr>
+ <tr>
+ <td>IPC</td>
+ <td>Not shared -> configurable (TBD)</td>
+ <td>Not shared -> configurable (TBD)</td>
+ </tr>
+ <tr>
+ <td>Cgroup</td>
+ <td>Shared w/ agent -> Not shared (TBD)</td>
+ <td>Shared w/ parent -> Not shared (TBD)</td>
+ </tr>
+ <tr>
+ <td>User (not supported)</td>
+ <td>Shared w/ agent</td>
+ <td>Shared w/ parent</td>
+ </tr>
+</table>
+
+*Note: For the top level container, `shared` means that the container
+shares the namespace from the agent. For the nested container, `shared`
+means that the nested container shares the namespace from its parent
+container.
+
###### Posix launcher (TBD)
<a name="Isolators"></a>
-##### Isolators
+##### [Isolators](mesos-containerizer.md#isolators)
-Isolators are responsible for creating an environment for the
-containers where resources like cpu, network, storage and memory can
-be isolated from other containers.
+[Isolators](mesos-containerizer.md#isolators) are responsible for creating
+an environment for the containers where resources like cpu, network,
+storage and memory can be isolated from other containers.
### Containerizer states