Merge branch '15964-fix-docs' refs #15964
[arvados.git] / doc / _includes / _install_compute_docker.liquid
1 {% comment %}
2 Copyright (C) The Arvados Authors. All rights reserved.
3
4 SPDX-License-Identifier: CC-BY-SA-3.0
5 {% endcomment %}
6
7 h2(#cgroups). Configure Linux cgroups accounting
8
9 Linux can report what compute resources are used by processes in a specific cgroup or Docker container.  Crunch can use these reports to share that information with users running compute work.  This can help workflow authors debug and optimize their workflows.
10
11 To enable cgroups accounting, you must boot Linux with the command line parameters @cgroup_enable=memory swapaccount=1@.
12
13 After making changes, reboot the system to make these changes effective.
14
15 h3. Red Hat and CentOS
16
17 <notextile>
18 <pre><code>~$ <span class="userinput">sudo grubby --update-kernel=ALL --args='cgroup_enable=memory swapaccount=1'</span>
19 </code></pre>
20 </notextile>
21
22 h3. Debian and Ubuntu
23
24 Open the file @/etc/default/grub@ in an editor.  Find where the string @GRUB_CMDLINE_LINUX@ is set.  Add @cgroup_enable=memory swapaccount=1@ to that string.  Save the file and exit the editor.  Then run:
25
26 <notextile>
27 <pre><code>~$ <span class="userinput">sudo update-grub</span>
28 </code></pre>
29 </notextile>
30
31 h2(#install_docker). Install Docker
32
33 Compute nodes must have Docker installed to run containers.  This requires a relatively recent version of Linux (at least upstream version 3.10, or a distribution version with the appropriate patches backported).  Follow the "Docker Engine installation documentation":https://docs.docker.com/install/ for your distribution.
34
35 Make sure Docker is enabled to start on boot:
36
37 <notextile>
38 <pre><code># <span class="userinput">systemctl enable --now docker</span>
39 </code></pre>
40 </notextile>
41
42 h2(#configure_docker_daemon). Configure the Docker daemon
43
44 Depending on your anticipated workload or cluster configuration, you may need to tweak Docker options.
45
46 For information about how to set configuration options for the Docker daemon, see https://docs.docker.com/config/daemon/systemd/
47
48 h3. Changing ulimits
49
50 Docker containers inherit ulimits from the Docker daemon.  However, the ulimits for a single Unix daemon may not accommodate a long-running Crunch job.  You may want to increase default limits for compute containers by passing @--default-ulimit@ options to the Docker daemon.  For example, to allow containers to open 10,000 files, set @--default-ulimit nofile=10000:10000@.