Categories

Versions

How to use CPU limits

Altair Units are pulled based on available CPUs in the docker container.

The cpuset setting limits container processes to be executed on specific CPU coress.

A comma-separated list or hyphen-separated range of CPUs can be provided as value for these settings.

Please read the following pages carefully:

Please note, that the CPU indexing starts with 0.

How to set up CPU limits in the templates

Using the variables below in .env file you can set up limits for containers:

Please note, that by default these settings are in comments in the templates.

You have to uncomment them both in .env and in docker-compose.yml as well to take effect.

In the .env file these variables are present in a block:

- AIHUB_BACKEND_CPUSET=0
- JOBAGENT_CPUSET=2
- WEBAPI_AGENT_CPUSET_1=4
- WEBAPI_AGENT_CPUSET_2=6
- SCORING_AGENT_CPUSET=6
- PANOPTICON_VIZAPP_CPUSET=8
- PANOPTICON_PYTHON_CPUSET=8
- PANOPTICON_RSERVE_CPUSET=8

In the docker-compose.yml file you can find these variables one-by-one:

...
cpuset: ${AIHUB_BACKEND_CPUSET}
...
cpuset: ${JOBAGENT_CPUSET}
...
puset: ${WEBAPI_AGENT_CPUSET_1}
...
cpuset: ${WEBAPI_AGENT_CPUSET_2}
...
cpuset: ${SCORING_AGENT_CPUSET}
...
cpuset: ${PANOPTICON_VIZAPP_CPUSET}
...
cpuset: ${PANOPTICON_PYTHON_CPUSET}
...
cpuset: ${PANOPTICON_RSERVE_CPUSET}
...