8.3.2. Memory Tuning with virsh
<memtune>element in the guest XML configuration allows administrators to configure guest virtual machine memory settings manually. If
<memtune>is omitted, default memory settings apply.
<memtune>element in a virtual machine with the
virsh memtunecommand, replacing values according to your environment:
virsh # memtune virtual_machine --parameter size
- The maximum memory the virtual machine can use, in kibibytes (blocks of 1024 bytes).
WarningSetting this limit too low can result in the virtual machine being killed by the kernel.
- The memory limit to enforce during memory contention, in kibibytes (blocks of 1024 bytes).
- The maximum memory plus swap the virtual machine can use, in kibibytes (blocks of 1024 bytes). The
swap-hard-limitvalue must be more than the
- The guaranteed minimum memory allocation for the virtual machine, in kibibytes (blocks of 1024 bytes).
# virsh help memtunefor more information on using the
virsh # memtunecommand.