20.43. Setting Schedule Parameters

download PDF
The virsh schedinfo command modifies host scheduling parameters of the virtual machine process on the host machine. The following command format should be used:
# virsh schedinfo domain --set --current --config --live
Each parameter is explained below:
  • domain - the guest virtual machine domain
  • --set - the string placed here is the controller or action that is to be called. The string uses the parameter=value format. Additional parameters or values if required should be added as well.
  • --current - when used with --set, will use the specified set string as the current scheduler information. When used without will display the current scheduler information.
  • --config - - when used with --set, will use the specified set string on the next reboot. When used without will display the scheduler information that is saved in the configuration file.
  • --live - when used with --set, will use the specified set string on a guest virtual machine that is currently running. When used without will display the configuration setting currently used by the running virtual machine
The scheduler can be set with any of the following parameters: cpu_shares, vcpu_period and vcpu_quota. These parameters are applied to the vCPU threads.
The following shows how the parameters map to cgroup field names:
  • cpu_shares:cpu.shares
  • vcpu_period:cpu.cfs_period_us
  • vcpu_quota:cpu.cfs_quota_us

Example 20.98. schedinfo show

This example shows the shell guest virtual machine's schedule information
# virsh schedinfo shell
Scheduler      : posix
cpu_shares     : 1024
vcpu_period    : 100000
vcpu_quota     : -1

Example 20.99. schedinfo set

In this example, the cpu_shares is changed to 2046. This effects the current state and not the configuration file.
# virsh schedinfo --set cpu_shares=2046 shell
Scheduler      : posix
cpu_shares     : 2046
vcpu_period    : 100000
vcpu_quota     : -1
libvirt also supports the emulator_period and emulator_quota parameters that modify the setting of the emulator process.
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


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.