Setting up the Limits
The first of the settings available for each managed resource is the
limit value. Each managed resource has its own limit value. By default,
limit values are not set, that is, resources are not limited.
Subscriptions can share limit settings, but each has its own limit.
If a resource is limited for a given subscription:
- The Cgroups Manager monitors all processes owned by the
subscription’s system user. Together these processes can consume no
more than the limit value of each resource. - If a subscription reaches its limit, the operating system performs a
certain action, depending on the resource type. - A subscription cannot exceed the limit even if free resources of the
corresponding type are available on the server (idle CPU cycles, free
RAM, etc.).
If a resource is not limited for a given subscription:
- A subscription’s processes can use as much of that resource as is
available. - The resource is shared between processes of all subscriptions:
- CPU time and disk I/O are shared almost equally.
- RAM is shared as requested by processes.
In both cases, there is no guarantee that a subscription will receive
any minimal amount of resource.
Allowed Setting Values for Limits
The limit settings may have the following values:
Setting | Measured in | Available values |
---|---|---|
CPU limit | Percentage of CPU time, where 100% is one CPU core fully used | Not more than 100% * Number of CPU cores |
RAM limit | Bytes | Not less than 1MB |
Disk input (write) speed | Bytes per seconds | Not less than 1MB per second |
Disk output (read) speed | Bytes per seconds | Not less than 1MB per second |
If the server has multiple CPU cores, the available CPU amount is equal
to 100% * the number of CPU cores. For example, if your server has four
CPU cores, the available CPU amount is 400%.
How the System Manages Resource Consumption
When the processes of a particular subscription use the maximum allowed
value of a resource, the operating system performs certain actions,
depending on the resource type.
Resource Overused | Actions | Impact |
---|---|---|
CPU, disk read and write bandwidth | The system restricts the processes of this subscription to use no more resources than the limit allows. |
The corresponding websites might operate more slowly and have a higher response time. |
RAM | When the processes of a particular subscription reach the RAM limit, the system kills the most memory-consuming one. |
The corresponding website might be unavailable for some time and respond to requests with HTTP codes 5xx. |