One of the cooler tech announcements at VMworld 2017 was on display at the NVIDIA booth. It wasn’t really an announcement, per se, but more of a demonstration of a long awaited solution to a very difficult challenge in the virtualization space.
NVIDIA displayed a tech demo of vMotion support for VMs with GRID vGPU running on ESXi. Along with this demo was news that they had also solved the problem of suspend and resume on vGPU enabled machines, and these solutions would be included in future product releases. NVIDIA announced live migration support for XenServer earlier this year.
Rob Beekmans (Twitter: @robbeekmans) also wrote about this recently, and his blog has video showing the tech demos in action.
I want to clarify that these are tech demos, not tech previews. Tech Previews, in VMware EUC terms, usually means a feature that is in beta or pre-release to get real-world feedback. These demos likely occurred on a development version of a future ESXi release, and there is no projected timeline as to when they will be released as part of a product.
Challenges to Enabling vMotion Support for vGPU
So you’re probably thinking “What’s the big deal? vMotion is old hat now.” But when vGPU is enabled on a virtual machine, it requires that VM to have direct, but shared, access to physical hardware on the system – in this case, a GPU. And vMotion never worked if a VM had direct access to hardware – be it a PCI device that was passed through or something plugged into a USB port.
If we look at how vGPU works, each VM has a shared PCI device added to it. This shared PCI device provides shared access to a physical card. To facilitate this access, each VM gets a portion of the GPU’s Base Address Register (BAR), or the hardware level interface between the machine and the PCI card. In order to make this portable, there has to be some method of virtualizing the BAR. A VM that migrates may not get the same address space on the BAR when it moves to a new host, and any changes to that would likely cause issues to Windows or any jobs that the VM has placed on the GPU.
There is another challenge to enabling vMotion support for vGPU. Think about what a GPU is – it’s a (massively parallel) processor with dedicated RAM. When you add a GPU into a VM, you’re essentially attaching a 2nd system to the VM, and the data that is in the GPU framebuffer and processor queues needs to be migrated along with the CPU, system RAM, and system state. So this requires extra coordination to ensure that the GPU releases things so they can be migrated to the new host, and it has to be done in a way that doesn’t impact performance for other users or applications that may be sharing the GPU.
Suspend and Resume is another challenge that is very similar to vMotion support. Suspending a VM basically hibernates the VM. All current state information about the VM is saved to disk, and the hardware resources are released. Instead of sending data to another machine, it needs to be written to a state file on disk. This includes the GPU state. When the VM is resumed, it may not get placed on the same host and/or GPU, but all the saved state needs to be restored.
Hardware Preemption and CUDA Support on Pascal
The August 2016 GRID release included support for the Pascal-series cards. Pascal series cards include hardware support for preemption. This is important for GRID because it uses time-slicing to share access to the GPU across multiple VMs. When a time-slice expires, it moves onto the next VM.
This can cause issues when using GRID to run CUDA jobs. CUDA jobs can be very long running, and the job is stopped when the time-slice is expired. Hardware preemption enables long-running CUDA tasks to be interrupted and paused when the time-slice expires, and those jobs are resumed when that VM gets a new time-slice.
So why is this important? In previous versions of GRID, CUDA was only available and supported on the largest profiles. So to support the applications that required CUDA in a virtual virtual environment, and entire GPU would need to be dedicated to the VM. This could be a significant overallocation of resources, and it significantly reduced the density on a host. If a customer was using M60s, which have two GPUs per card, then they may be limited to 4 machines with GPU access if they needed CUDA support.
With Pascal cards and the latest GRID software, CUDA support is enabled on all vDWS profiles (the ones that end with a Q). Now customers can provide CUDA-enabled vGPU profiles to virtual machines without having to dedicate an entire GPU to one machine.
This has two benefits. First, it enables more features in the high-end 3D applications that run on virtual workstations. Not only can these machines be used for design, they can now utilize the GPU to run models or simulations.
The second benefit has nothing to do with virtual desktops or applications. It actually allows GPU-enabled server applications to be fully virtualized. This potentially means things like render farms or, in a future looking state, virtualized AI inference engines for business applications or infrastructure support services. One potentially interesting use case for this is running MapD, a database that runs entirely in the GPU, on a virtual machine.
GPUs have the ability to revolutionize enterprise applications in the data center. They can potentially bring artificial intelligence, deep learning, and massively parallel computing to business apps.
vMotion support is critical in enabling enterprise applications in virtual environments. The ability to move applications and servers around is important to keeping services available.
By enabling hardware preemption and vMotion support, it now becomes possible to virtualize the next generation of business applications. These applications will require a GPU and CUDA support to improve performance or utilize deep learning algorithms. Applications that require a GPU and CUDA support can be moved around in the datacenter without impacting the running workloads, maintaining availability and keeping active jobs running so they do not have to be restarted.
This also opens up new opportunities to better utilize data center resources. If I have a large VDI footprint that utilizes GRID, I can’t vMotion any running desktops today to consolidate them on particular hosts. If I can use vMotion to consolidate these desktops, I can utilize the remaining hosts with GPUs to perform other tasks with GPUs such as turning them into render farms, after-hours data processing with GPUs, or other tasks.
This may not seem important now. But I believe that deep learning/artificial intelligence will become a critical feature in business applications, and the ability to turn my VDI hosts into something else after-hours will help enable these next generation applications.