Enable vEGM on a guest
To provide a virtual machine (VM) with contiguous system memory backed by host Extended GPU Memory (EGM) character devices, enable Virtual EGM (vEGM) for the VM. This improves performance for workloads with large GPU memory footprints.
Before you begin
- A RHEL for NVIDIA virtual guest system is deployed and currently shut down. See Install a guest system by using virt-install or Install a guest system by using an XML configuration for details.
- Extended GPU Memory (EGM) is enabled on the host system and the corresponding EGM character devices (for example,
/dev/egm0) are present. For details, see Enable EGM on a host system. - A physical GPU is assigned to the guest system by using GPU passthrough. For details, see Install a guest system by using virt-install or Install a guest system by using an XML configuration.
- Commands that start with the
#command prompt require administrative privileges provided bysudoor root user access. For information on how to configuresudoaccess, see Enabling unprivileged users to run certain commands.
Procedure
Results
- In the guest operating system, verify that EGM is enabled:
$ nvidia-smi -q | grep -i enabled | grep EGMIf the output returns multiple lines confirming
EGM : enabled, the configuration is successful.
- If the VM starts but QEMU attempts to create an excessively large file in the host file system, the specified EGM character device is missing. To detect this condition, monitor host disk usage while the VM is starting:
# df -h / && ls -lh /var/lib/libvirt/qemu/memory/If a multi-gigabyte file is growing in the memory backing directory, shut down the VM immediately and verify that EGM is properly enabled in the host firmware and that the
nvgrace_egmmodule is loaded.
What to do next
- Configure the guest operating system