I’d like to limit the CPU usage of the runners on my server and it seems I need to set DRONE_CPU_QUOTA and/or DRONE_CPU_PERIOD to do so but I don’t really understand from the documentation what values should I set.
Let’s say I want to limit the CPU usage to 75%, what values should I use ?
Drone exposes the underlying
--cpu-period docker flags. You will probably need to consult the docker documentation to figure out which values to use in these fields.
The --cpu-quota option specifies the number of microseconds that a container has access to CPU resources during a period specified by --cpu-period. As the default value of --cpu-period is 100000, setting the value of --cpu-quota to 25000 limits a container to 25% of the CPU resources. By default, a container can use all available CPU resources, which corresponds to a --cpu-quota value of -1.