浏览代码

Add docs for cgroup-parent of systemd cgroup

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Qiang Huang 9 年之前
父节点
当前提交
c7f2079a9b
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      docs/reference/commandline/daemon.md

+ 8 - 0
docs/reference/commandline/daemon.md

@@ -804,6 +804,14 @@ Assuming the daemon is running in cgroup `daemoncgroup`,
 `/sys/fs/cgroup/memory/foobar`, whereas using `--cgroup-parent=foobar`
 creates the cgroup in `/sys/fs/cgroup/memory/daemoncgroup/foobar`
 
+The systemd cgroup driver has different rules for `--cgroup-parent`. Systemd
+represents hierarchy by slice and the name of the slice encodes the location in
+the tree. So `--cgroup-parent` for systemd cgroups should be a slice name. A
+name can consist of a dash-separated series of names, which describes the path
+to the slice from the root slice. For example, `--cgroup-parent=user-a-b.slice`
+means the memory cgroup for the container is created in
+`/sys/fs/cgroup/memory/user.slice/user-a.slice/user-a-b.slice/docker-<id>.scope`.
+
 This setting can also be set per container, using the `--cgroup-parent`
 option on `docker create` and `docker run`, and takes precedence over
 the `--cgroup-parent` option on the daemon.