I have 3 processes on a single core machine. Each process is exactly the same and burns CPU as fast as it can (tight loop). Two of them (
B) are launched with cgexec in separate groups with shares set to 512 and 512. The third (
C) is launched regularly, not with cgexec.
Once all are up and running,
C gets 66% of the CPU while
B split 33%. If I kill
B get 50% each (as expected).
C get 66%? I would have expected 33% each in this scenario, or maybe 50% (C), 25% (A) and 25% (B). 66% going to
C doesn't work out no matter how I do the math though.
In general, I want to understand how processes launched without
cgexec interact with processes launched with
cgexec when it comes to resource sharing (CPU in particular, but a more general answer would be appreciated if it isn't too complex).