1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
<!--#include virtual="header.txt"-->
<h1>job_container/tmpfs</h1>
<h2 id="overview">Overview<a class="slurm_link" href="#overview"></a></h2>
<p>job_container/tmpfs is an optional plugin that provides job-specific, private
temporary file system space.</p>
<p>When enabled on the cluster, each job will have its own /tmp and /dev/shm
directory, seperate from every other job as well as the system. These are
mapped in the job as "/tmp" and "/dev/shm".</p>
<h2 id="installation">Installation
<a class="slurm_link" href="#installation"></a>
</h2>
<p>This plugin is built and installed as part of the default build, no extra
installation steps are required.</p>
<h2 id="setup">Setup<a class="slurm_link" href="#setup"></a></h2>
<p>Slurm must be configured to load the job container plugin by adding
<b>JobContainerType=job_container/tmpfs</b> and <b>PrologFlags=contain</b> in
slurm.conf. Additional configuration must be done in the "job_container.conf"
file, which should be placed in the same directory as the slurm.conf.</p>
<p>Job containers can be configured for all nodes, or for a subset of nodes.
As an example, if all nodes will be configured the same way, you would put the
following in your job_container.conf:</p>
<pre>
AutoBasePath=true
BasePath=/var/nvme/storage
</pre>
<p>A full description of the parameters available in the job_container.conf
file can be found <a href="job_container.conf.html">here</a>.</p>
<h2 id="initial_testing">Initial Testing
<a class="slurm_link" href="#initial_testing"></a>
</h2>
<p>An easy way to verify that the container is working is to run a job and
ensure that the /tmp directory is empty (since it normally has some other
files) and that "." is owned by the user that submitted the job.</p>
<pre>
tim@slurm-ctld:~$ srun ls -al /tmp
total 8
drwx------ 2 tim root 4096 Feb 10 17:14 .
drwxr-xr-x 21 root root 4096 Nov 15 08:46 ..
</pre>
<h2 id="spank">Spank<a class="slurm_link" href="#spank"></a></h2>
<p>This plugin interfaces with the SPANK api, and automatically joins the job's
container in the following functions:</p>
<ul>
<li>spank_task_init_privileged()</li>
<li>spank_task_init()</li>
</ul>
<p>In addition to the job itself, The TaskProlog will also be executed inside
the container.</p>
<p style="text-align:center;">Last modified 12 May 2022</p>
<!--#include virtual="footer.txt"-->
|