Questo contenuto non è disponibile nella lingua selezionata.
20.42. Managing Resources for Guest Virtual Machines
virsh allows the grouping and allocation of resources on a per guest virtual machine basis. This is managed by the libvirt daemon which creates cgroups and manages them on behalf of the guest virtual machine. The only thing that is left for the system administrator to do is to either query or set tunables against specified guest virtual machines. The
libvirt
service uses the following cgroups for tuning and monitoring virtual machines:
memory
- The memory controller allows for setting limits on RAM and swap usage and querying cumulative usage of all processes in the groupcpuset
- The CPU set controller binds processes within a group to a set of CPUs and controls migration between CPUs.cpuacct
- The CPU accounting controller provides information about CPU usage for a group of processes.cpu
-The CPU scheduler controller controls the prioritization of processes in the group. This is similar to grantingnice
level privileges.devices
- The devices controller grants access control lists on character and block devices.freezer
- The freezer controller pauses and resumes execution of processes in the group. This is similar toSIGSTOP
for the whole group.net_cls
- The network class controller manages network utilization by associating processes with atc
network class.
cgroups are set up by
systemd
in libvirt. The following virsh
tuning commands affect the way cgroups are configured:
schedinfo
- described in Section 20.43, “Setting Schedule Parameters”blkdeviotune
- described in Section 20.44, “Disk I/O Throttling”blkiotune
- described in Section 20.45, “Display or Set Block I/O Parameters”domiftune
- described in Section 20.12.5, “Setting Network Interface Bandwidth Parameters”memtune
- described in Section 20.46, “Configuring Memory Tuning”
For more information about cgroups, see the Red Hat Enterprise Linux 7 Resource Management Guide.