V
V
Valioozz2019-12-17 17:58:58
linux
Valioozz, 2019-12-17 17:58:58

How does Linux CFS distribute the load of cgroups on a multiprocessor system?

I'm trying to figure out how CFS will behave if there are 2 cgroups with equivalent cpu.shares, for example, on an 8-core system. Interested only in the ideal theoretical side of the issue.
Will each cgroups get 50% of each of the 8 cores, or can it be distributed arbitrarily so that the process gets the equivalent of 4CPU computing resources?
Example:
If we imagine that we have an 8-core system and we run 2 containers, without limit quotas, each of which will be in its own cgroup and 1024 shares will be set by default for each, then, given that cgroups do not provide full isolation, then both containers will see all 8 cores of the system and by default can use a total of 4 cores
For some reason, I thought that these would not be 4 dedicated cores, but by default it would be 50% of each of the 8 cores.
Help me figure it out, thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
uvelichitel, 2019-12-17
@Valioozz

The equivalent of 4CPU computing resources at a possible 100% load.
RedHat docs
Because it's easier to implement.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question