CPU usage throttling v15
EDB Resource Manager uses CPU throttling to keep the aggregate CPU usage of all processes in the group within the limit specified by the cpu_rate_limit
parameter. A process in the group might be interrupted and put into sleep mode for a short time to maintain the defined limit. When and how such interruptions occur is defined by a proprietary algorithm used by EDB Resource Manager.
To control CPU use of a resource group, set the cpu_rate_limit
resource type parameter.
Set the
cpu_rate_limit
parameter to the fraction of CPU time over wall-clock time to which the combined, simultaneous CPU usage of all processes in the group must not exceed. The value assigned tocpu_rate_limit
is typically less than or equal to 1.On multicore systems, you can apply the
cpu_rate_limit
to more than one CPU core by setting it to greater than 1. For example, ifcpu_rate_limit
is set to 2.0, you use 100% of two CPUs. The valid range of thecpu_rate_limit
parameter is 0 to 1.67772e+07. A setting of 0 means no CPU rate limit was set for the resource group.When the value is multiplied by 100, you can also interpret the
cpu_rate_limit
as the CPU usage percentage for a resource group.
Setting the CPU rate limit for a resource group
Use the ALTER RESOURCE GROUP
command with the SET cpu_rate_limit
clause to set the CPU rate limit for a resource group.
In this example, the CPU usage limit is set to 50% for resgrp_a
, 40% for resgrp_b
, and 30% for resgrp_c
. This means that the combined CPU usage of all processes assigned to resgrp_a
is maintained at approximately 50%. Similarly, for all processes in resgrp_b
, the combined CPU usage is kept to approximately 40%, and so on.