Understanding the need for Version 2
As good as cgroups Version 1 is, it does have a few rather serious flaws. Let's take a quick look.
Version 1 complexity
To begin with, Version 1 has too many resource controllers and too many attributes per controller. Very few people use more than just the Big Three controllers that we covered in Chapter 12, Controlling Resource Usage with cgroups Version 1. Some unnecessary controllers have been removed from Version 2.
There's also too much complexity with the Version 1 hierarchy, which makes it a bit confusing to use and can hurt performance. To see what I mean, think back about what we saw in the Version 1 cgroup
filesystem. You saw that each resource controller has its own subdirectory, as we see here:
In Chapter 12, Controlling Resource Usage with cgroups Version 1, we also saw that when we set a CPUQuota
for Vicky, it appeared...