Datalore 2024.5 Help

Limit RAM/CPU consumption for SQL containers

Follow the procedure below to limit CPU and RAM consumption for docker containers that handle database-related tasks.

  1. Open the docker-compose.yaml file.

  2. Add the following parameters under environment as shown in the code below:

    environment: SQL_SESSION_MEMORY: "3G" SQL_SESSION_CPUS: "2" MAX_HEAP_SIZE: "2G"

    where:

    • SQL_SESSION_MEMORY: specifies the memory volume.

    • SQL_SESSION_CPUS: specifies the number of CPUs.

    • MAX_HEAP_SIZE specifies how much memory can be allocated to the Java machine. By default, it is set to 1/3 of the SQL_SESSION_MEMORY value and often does not need to be customized.

Last modified: 26 March 2024