In the memory cgroup enable memory.use_hierarchy in the cgroup root.