[libvirt-users] libvirt/qemu and cgroups

arnaud gaboury arnaud.gaboury at gmail.com
Sun Feb 9 23:29:10 UTC 2014


Dear list,

I am building a Arch server on my Arch box.
My tools are QEMU/KVM and libvirt to manage the guest, systemd as
system manager.

I am looking at implementing the Linux Control Groups facilities for
resource management. Even after long hours of reading, I am not quite
sure about how to deal with the cgroups facilities.

First, do I really need to care about all that, or libvirt and systemd
will manage the resource in an efficient way right out of the box?

If not, It's all about /etc/cgconfig.conf and cgrules.conf. I am
honestly not sure :
 -what are the correct mount points for cpu, memory etc in the
/sys/fs/cgroup directory .
- which directories am I supposed to mk, if any ?

Then, Archwiki[1] says:

# cgcreate -a $USER -g memory,cpu:groupname


- what is the groupename I shall create (qemu*, MyMachine) ?
- which $USER shall I use (qemu*, my username) ?

* qemu:qemu as user:group in /etc/libvirt/qemu.conf

Thank you for some help as I admit if I understand the cgroups
principle and advantages, I am far from understanding how to create
such a group in case of a VM.

[1]https://wiki.archlinux.org/index.php/Cgroups




More information about the libvirt-users mailing list