Skip to content

Instantly share code, notes, and snippets.

@major
Created November 3, 2014 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save major/a8d6a068bd1fdceef97c to your computer and use it in GitHub Desktop.
Save major/a8d6a068bd1fdceef97c to your computer and use it in GitHub Desktop.
systemd aggressive cgroup trimming
If I leave a KVM virtual machine running for a short while, I see this:
# find /sys/fs/cgroup -name machine-qem*
/sys/fs/cgroup/perf_event/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/net_cls,net_prio/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/freezer/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/systemd/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
Once I reboot it, I see this:
# find /sys/fs/cgroup -name machine-qem*
/sys/fs/cgroup/perf_event/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/blkio/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/net_cls,net_prio/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/freezer/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/devices/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/memory/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/cpu,cpuacct/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/cpuset/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
/sys/fs/cgroup/systemd/machine.slice/machine-qemu\x2dinstance\x2dc51f7c4b\x2d12a1\x2d4cfe\x2d87e0\x2d55b237ef31d2.scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment