An introduction to cgroups
In the hazy past, the kernel community struggled mightily with a rather vexing issue: though scheduling algorithms and their implementations – the early 2.6.0 O(1) scheduler, and a little later (with 2.6.23), the Completely Fair Scheduler (CFS) – promised, well, completely fair scheduling, it really wasn’t “completely fair” in any meaningful sense of the term!
Think about this for a moment: let’s say you are logged in to a Linux server along with nine other people. Everything else being equal, it is likely that processor time is (more or less) fairly shared between all ten of you; of course, you will understand that it’s not really people that run on the processor(s) and eat memory, it’s processes and threads that do so on their behalf.
For now, at least, let’s assume it’s (mostly) fairly shared. But, what if you, one of the ten users logged in, write a user space program that...