Control groups is another Subsystem like netfliter
Limit the usage of ressources ( CPU, MEM, cpuset, blkio )
[root@centos7_new ~]# mount | grep cgroup
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
[root@centos7_new ~]# lssubsys -m
cpuset /sys/fs/cgroup/cpuset
cpu,cpuacct /sys/fs/cgroup/cpu,cpuacct
memory /sys/fs/cgroup/memory
devices /sys/fs/cgroup/devices
freezer /sys/fs/cgroup/freezer
net_cls,net_prio /sys/fs/cgroup/net_cls,net_prio
blkio /sys/fs/cgroup/blkio
perf_event /sys/fs/cgroup/perf_event
hugetlb /sys/fs/cgroup/hugetlb
pids /sys/fs/cgroup/pids
[root@centos7_new ~]# tree /sys/fs/cgroup/ | less
/sys/fs/cgroup/
├── blkio
│ ├── blkio.io_merged
│ ├── blkio.io_merged_recursive
│ ├── blkio.io_queued
│ ├── blkio.io_queued_recursive
│ ├── blkio.io_service_bytes
│ ├── blkio.io_service_bytes_recursive
│ ├── blkio.io_serviced
│ ├── blkio.io_serviced_recursive
│ ├── blkio.io_service_time
[root@centos7_new ~]# virsh list --all
Id Name State
----------------------------------------------------
1 grml1 running
[root@centos7_new ~]# cat /sys/fs/cgroup/memory/machine.slice/machine-qemu\\x2d1\\x2dgrml1.scope/memory.stat
cache 97161216
rss 345870336
rss_huge 270532608
mapped_file 4206592
swap 0
pgpgin 75628
pgpgout 34407
pgfault 24533
pgmajfault 40
inactive_anon 208404480
active_anon 137486336
inactive_file 79470592
active_file 17670144
unevictable 0
hierarchical_memory_limit 9223372036854771712
hierarchical_memsw_limit 9223372036854771712
total_cache 97161216
total_rss 345870336
total_rss_huge 270532608
total_mapped_file 4206592
total_swap 0
total_pgpgin 75628
total_pgpgout 34407
total_pgfault 24533
total_pgmajfault 40
total_inactive_anon 208404480
total_active_anon 137486336
total_inactive_file 79470592
total_active_file 17670144
total_unevictable 0