We have seen some options for limiting the container's resource consumption. We will be able to limit access to CPU, memory, and block devices. There are two types of limits when we focus on memory resources: soft and hard limits.
Soft limits will represent a reservation of resources. This means that a container could consume more memory than declared, but this value will be reserved.
On the other hand, a hard limit will ensure that no more than the declared value will be consumed. In fact, the container will die if this limit is surpassed. An out-of-memory (also known as OOM) killer will kill the main process to prevent host problems.
There are many options available to ensure limited access to resources. We can modify default cgroups settings automatically with these parameters:
--cpu-period and --cpu-quota |
CFS is the Linux kernel... |