Use Containers for Jobs

Linux containers can be leveraged to constrain the amount of system resources used by jobs.

Containers are enabled by the administrator through named configurations that can be requested as a job resource. Each named configuration will contain a recipe of hooks to call to setup the container, and limits to enact upon them.

As a basic example:
% nc run -r Container:c1 -- sleep 120

The above job submission example will request that the tasker follow the recipe defined in the named configuration file for c1, to create the container described in the configuration and place the job into it.

The named container configuration may be defined to impose resource limits for the container being created. Some limits can be defined by the user through the use of resource requests in the job submission. There are three such requests that are considered during the processing of the named container configuration: CORES, RAM, and TMP.

CORES limit example:
% nc run -r Container:c1 CORES/2 -- sleep 120
RAM limit example:
% nc run -r Container:c1 RAM/20000 -- sleep 120
TMP limit example:
% nc run -r Container:c1 TMP#50000 -- sleep 120

RAM and TMP resources are specified in megabytes. Note that RAM is consumable, as indicated by the use of the / in the request. TMP, however, is not consumable, and such requests should use #. If a / is used with TMP, the amount of the TMP resource offered by the tasker will not be adjusted.