Search

20.42. Managing Resources for Guest Virtual Machines

download PDF
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 group
  • cpuset - 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 granting nice 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 to SIGSTOP for the whole group.
  • net_cls - The network class controller manages network utilization by associating processes with a tc network class.
cgroups are set up by systemd in libvirt. The following virsh tuning commands affect the way cgroups are configured:
For more information about cgroups, see the Red Hat Enterprise Linux 7 Resource Management Guide.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.