The memory usage I see here:
sudo cat /sys/fs/cgroup/memory/memory.usage_in_bytes
is different the from the sum of memory usage of the sub cgroups, which I calculated by getting all the sub cgroups using the following command:
sudo ls -dltrh /sys/fs/cgroup/memory/*/
Then I took the sum of the memory.usage_in_bytes
for all of these sub cgroups. From what I understand, these two values should match.