Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

GPU virtualization

From Wikipedia, the free encyclopedia
Technology that allows a GPU to be used by multiple virtual machines

GPU virtualization refers to technologies that allow the use of aGPU toaccelerategraphics orGPGPU applications running on avirtual machine. GPU virtualization is used in various applications such asdesktop virtualization,[1]cloud gaming[2] andcomputational science (e.g.hydrodynamics simulations).[3]

GPU virtualization implementations generally involve one or more of the following techniques: device emulation, API remoting, fixed pass-through and mediated pass-through. Each technique presents different trade-offs regarding virtual machine to GPUconsolidation ratio,graphicsacceleration, renderingfidelity andfeature support,portability to different hardware,isolation between virtual machines, and support for suspending/resuming andlive migration.[1][4][5][6]

API remoting

[edit]

InAPI remoting or API forwarding, calls to graphical APIs from guest applications are forwarded to the host byremote procedure call, and the host then executes graphical commands from multiple guests using the host's GPU as a single user.[1] It may be considered a form ofparavirtualization when combined with device emulation.[7] This technique allows sharing GPU resources between multiple guests and the host when the GPU does not support hardware-assisted virtualization. It is conceptually simple to implement, but it has several disadvantages:[1]

  • In pure API remoting, there is little isolation between virtual machines when accessing graphical APIs; isolation can be improved using paravirtualization
  • Performance ranges from 86% to as low as 12% of native performance in applications that issue a large number of drawing calls perframe
  • A large number of APIentry points must be forwarded, and partial implementation of entry points may decrease fidelity
  • Applications on guest machines may be limited to few available APIs

Hypervisors usually useshared memory between guest and host to maximize performance and minimize latency. Using anetwork interface instead (a common approach indistributed rendering), third-party software can add support for specific APIs (e.g.rCUDA[8] forCUDA) or add support for typical APIs (e.g.VMGL[9] forOpenGL) when it is not supported by the hypervisor's software package, althoughnetwork delay andserializationoverhead may outweigh the benefits.

Application support from API remoting virtualization technologies
TechnologyDirect3DOpenGLVulkanOpenCLDXVA
VMware Virtual Shared Graphics Acceleration (vSGA)[10][11]114.3[12]YesNoNo
Parallels Desktop for Mac 3D acceleration[13]11[A]3.3[B]NoNoNo
Hyper-VRemoteFX vGPU[15][16]124.4No1.1No
VirtualBox Guest Additions 3D driver[17][18][19]8/9[C]2.1[D]NoNoNo
Thincast Workstation - Virtual 3D[21]12.1NoYesNoNo
QEMU/KVM with Virgil 3D[22][23][24][25]No4.3PlannedNoNo
  1. ^Wrapped to OpenGL usingWineD3D.[14]
  2. ^Compatibility profile.
  3. ^Experimental. Wrapped to OpenGL usingWineD3D.[20]
  4. ^Experimental.

Fixed pass-through

[edit]

In fixed pass-through or GPU pass-through (a special case ofPCI pass-through), a GPU is accessed directly by a single virtual machine exclusively and permanently. This technique achieves 96–100% of native performance[3] and high fidelity,[1] but the acceleration provided by the GPU cannot be shared between multiple virtual machines. As such, it has the lowestconsolidation ratio and the highest cost, as each graphics-accelerated virtual machine requires an additional physical GPU.[1]

The following software technologies implement fixed pass-through:

VirtualBox removed support for PCI pass-through in version 6.1.0.[34]

QEMU/KVM

[edit]

For certain GPU models, Nvidia and AMD video card drivers attempt to detect the GPU is being accessed by a virtual machine and disable some or all GPU features.[35] NVIDIA has recently changed virtualization rules for consumer GPUs by disabling the check in GeForce Game Ready driver 465.xx and later.[36]

For NVIDIA, various architectures of desktop and laptop consumer GPUs can be passed through in various ways. For desktop graphics cards, passthrough can be done via the KVM using either the legacy or UEFI BIOS configuration via SeaBIOS and OVMF, respectively.

NVIDIA

[edit]

Desktops

[edit]

For desktops, most graphics cards can be passed through, although for graphics cards with the Pascal architecture or older, the VBIOS of the graphics card must be passed through in the virtual machine if the GPU is used to boot the host.[37]

Laptops

[edit]

For laptops, the NVIDIA driver checks for the presence of a battery via ACPI, and without a battery, an error will be returned. To avoid this, an acpitable created from text converted into Base64 is required to spoof a battery and bypass the check.[37]

Pascal and earlier
[edit]

For the laptop graphics cards that are Pascal and older, passthrough varies widely on the configuration of the graphics card. For laptops that do not have NVIDIA Optimus, such as the MXM variants, passthrough can be achieved through traditional methods. For laptops that have NVIDIA Optimus on as well as rendering through the CPU's integrated graphics framebuffer as opposed to its own, the passthrough is more complicated, requiring a remote rendering display or service, the use of Intel GVT-g, as well as integrating the VBIOS into the boot configuration due to the VBIOS being present in the laptop's system BIOS as opposed to the GPU itself. For laptops that have a GPU with NVIDIA Optimus and have a dedicated framebuffer, the configurations may vary. If NVIDIA Optimus can be switched off, then passthrough is possible through traditional means. However, if Optimus is the only configuration, then it is most likely that the VBIOS is present in the laptop's system BIOS, requiring the same steps as the laptop rendering only on the integrated graphics framebuffer, but an external monitor is also possible.[38]

Mediated pass-through

[edit]

In mediated device pass-through or full GPU virtualization, the GPU hardware providescontexts withvirtual memory ranges for each guest throughIOMMU and the hypervisor sends graphical commands from guests directly to the GPU. This technique is a form ofhardware-assisted virtualization and achieves near-native[b] performance and high fidelity. If the hardware exposes contexts as full logical devices, then guests can use any API. Otherwise, APIs and drivers must manage the additional complexity of GPU contexts. As a disadvantage, there may be little isolation between virtual machines when accessing GPU resources.[1]

The following software and hardware technologies implement mediated pass-through:

While API remoting is generally available for current and older GPUs, mediated pass-through requires hardware support available only on specific devices.

Hardware support for mediated pass-through virtualization
VendorTechnologyDedicated graphics card familiesIntegrated GPU families
ServerProfessionalConsumer
NvidiavGPU[47]GRID,TeslaQuadroNo
AMDMxGPU[43][48]FirePro Server,Radeon InstinctRadeon ProNoNo
IntelGVT-gBroadwell and newer

Device emulation

[edit]

GPU architectures are very complex and change quickly, and their internal details are often kept secret. It is generally not feasible to fully virtualize new generations of GPUs, only older and simpler generations. For example,PCem, a specialized emulator of theIBM PC architecture, can emulate aS3 ViRGE/DX graphics device, which supportsDirect3D 3, and a3dfx Voodoo2, which supportsGlide, among others.[49]

When using aVGA or anSVGA virtual display adapter,[50][51][52] the guest may not have 3D graphics acceleration, providing only minimal functionality to allow access to the machine via a graphics terminal. The emulated device may expose only basic 2D graphics modes to guests. The virtual machine manager may also provide common API implementations usingsoftware rendering to enable 3D graphics applications on the guest, albeit at speeds that may be low as 3% of hardware-accelerated native performance.[1] The following software technologies implement graphics APIs using software rendering:

See also

[edit]

Notes

[edit]
  1. ^abNot available onVMware Workstation.
  2. ^Intel GVT-g achieves 80–90% of native performance.[39][40] Nvidia vGPU achieves 88–96% of native performance considering the overhead on a VMware hypervisor.[41]

References

[edit]
  1. ^abcdefghDowty, Micah; Sugerman, Jeremy (July 2009). Written atSan Diego."GPU Virtualization on VMware's Hosted I/O Architecture"(PDF).ACM SIGOPS Operating Systems Review.43 (3).New York City:Association for Computing Machinery:73–82.doi:10.1145/1618525.1618534.ISSN 0163-5980.S2CID 228328. Retrieved10 September 2020.
  2. ^Hong, Hua-Jun; Fan-Chiang, Tao-Ya; Lee, Che-Rung; Chen, Kuan-Ta; Huang, Chun-Ying; Hsu, Cheng-Hsin (2014).GPU Consolidation for Cloud Games: Are We There Yet?. 13th Annual Workshop on Network and Systems Support for Games.Nagoya:Institute of Electrical and Electronics Engineers. pp. 1–6.doi:10.1109/NetGames.2014.7008969.ISBN 978-1-4799-6882-4.ISSN 2156-8138.S2CID 664129. Retrieved14 September 2020.
  3. ^abWalters, John; Younge, Andrew; Kang, Dong-In; Yao, Ke-Thia; Kang, Mikyung; Crago, Stephen; Fox, Geoffrey (2014). "GPU Passthrough Performance: A Comparison of KVM, Xen, VMware ESXi, and LXC for CUDA and OpenCL Applications".IEEE 7th International Conference on Cloud Computing.Anchorage:IEEE Computer Society. pp. 636–643.doi:10.1109/CLOUD.2014.90.ISBN 978-1-4799-5063-8.ISSN 2159-6190.
  4. ^Yu, Hangchen; Rossbach, Christopher (25 June 2017).Full Virtualization for GPUs Reconsidered(PDF).ISCA-44 14th Annual Workshop on Duplicating, Deconstructing and Debunking.Toronto. Retrieved12 September 2020.
  5. ^Tian, Kun; Dong, Yaozu; Cowperthwaite, David (June 2014)."A Full GPU Virtualization Solution with Mediated Pass-Through"(PDF).Proceedings of the 2014 USENIX Conference on USENIX Annual Technical Conference (USENIX ATC'14).USENIX Annual Technical Conference.Philadelphia:USENIX. pp. 121–132.ISBN 978-1-931971-10-2.
  6. ^Gottschlag, Mathias; Hillenbrand, Marius; Kehne, Jens; Stoess, Jan; Bellosa, Frank (November 2013).LoGV: Low-Overhead GPGPU Virtualization(PDF). 10thInternational Conference on High Performance Computing.Zhangjiajie:IEEE Computer Society. pp. 1721–1726.doi:10.1109/HPCC.and.EUC.2013.245.ISBN 978-0-7695-5088-6. Retrieved16 September 2020.
  7. ^Suzuki, Yusuke; Kato, Shinpei; Yamada, Hiroshi; Kono, Kenji (June 2014)."GPUvm: Why Not Virtualizing GPUs at the Hypervisor?"(PDF).Proceedings of the 2014 USENIX Conference on USENIX Annual Technical Conference (USENIX ATC'14).USENIX Annual Technical Conference.Philadelphia:USENIX. pp. 109–120.ISBN 978-1-931971-10-2. Retrieved14 September 2020.
  8. ^Duato, José; Peña, Antonio; Silla, Federico; Fernández, Juan; Mayo, Rafael; Quintana-Ortí, Enrique (December 2011).Enabling CUDA acceleration within virtual machines using rCUDA(PDF). 18thInternational Conference on High Performance Computing.Bangalore:IEEE Computer Society. pp. 1–10.doi:10.1109/HiPC.2011.6152718.hdl:2117/168226.ISBN 978-1-4577-1951-6.ISSN 1094-7256. Retrieved13 September 2020.
  9. ^Lagar-Cavilla, Horacio; Tolia, Niraj; Satyanarayanan, Mahadev; Lara, Eyal (June 2007)."VMM-Independent Graphics Acceleration"(PDF). Written atSan Antonio.Proceedings of the 3rd International Conference on Virtual Execution Environments.VEE '07.New York City:Association for Computing Machinery. pp. 33–43.doi:10.1145/1254810.1254816.ISBN 978-1-59593-630-1. Retrieved12 September 2020.
  10. ^abLantinga, Hilko.Deploying Hardware-Accelerated Graphics with VMware Horizon (Guide).VMware. Retrieved12 September 2020.
  11. ^visaac."VMware Workstation 16 Pro Release Notes".docs.vmware.com. Retrieved2021-03-24.
  12. ^"VMware's SVGA Gallium3D Driver Lands OpenGL 4.3 Support In Mesa 22.0".
  13. ^"Graphics Settings".Parallels Desktop - User's Guide (Guide).Parallels.
  14. ^Bright, Peter (11 March 2014)."Valve releases open source Direct3D to OpenGL translator".Ars Technica. Retrieved15 September 2020.
  15. ^"Deploy graphics devices using RemoteFX vGPU".Hyper-V on Windows Server (Manual).Microsoft. Retrieved13 September 2020.
  16. ^"Plan for GPU acceleration in Windows Server".Hyper-V on Windows Server (Manual).Microsoft. Retrieved15 September 2020.
  17. ^"Hardware-Accelerated Graphics".Oracle VM VirtualBox User Manual (Manual).Oracle Corporation. Retrieved12 September 2012.
  18. ^"Guest Additions".Oracle VM VirtualBox User Manual (Manual).Oracle Corporation. Retrieved12 September 2020.
  19. ^Larabel, Michael (19 December 2018)."VirtualBox 6.0 3D/OpenGL Performance With VMSVGA Adapter".Phoronix. Retrieved15 September 2020.
  20. ^Larabel, Michael (29 January 2009)."VirtualBox Gets Accelerated Direct3D Support".Phoronix. Retrieved15 September 2020.
  21. ^Hi! - The Thincast Workstation FreeRDP Blog
  22. ^"Virgil 3D GPU project".GitHub (Project).freedesktop.org. Retrieved13 September 2020.
  23. ^Edge, Jake (10 September 2014).Virgil 3D: A virtual GPU (Article).LWN.net. Retrieved13 September 2020.
  24. ^Wollny, Gert (28 August 2019)."Virglrenderer and the state of virtualized virtual worlds".Collabora News & Blog. Retrieved15 September 2020.
  25. ^Hoffmann, Gerd (28 November 2019)."virtio gpu status and plans". Retrieved15 September 2020.
  26. ^GPU Development with Parallels Workstation Extreme(PDF) (White paper).Parallels. 2010. Retrieved13 September 2020.
  27. ^"Deploy graphics devices using Discrete Device Assignment".Hyper-V on Windows Server (Manual).Microsoft. Retrieved13 September 2020.
  28. ^ab"HDX 3D Pro".XenApp and XenDesktop 7.15 LTSR (Manual).Citrix Systems. Retrieved15 September 2020.
  29. ^ab"Graphics overview".Citrix Hypervisor 8.2 (Manual).Citrix Systems. Retrieved15 September 2020.
  30. ^abGVT-d Setup Guide.GitHub (Guide). Retrieved13 September 2020.
  31. ^abcLarabel, Michael (4 May 2014)."Intel Pushes Their Graphics Virtualization Capabilities".Phoronix. Retrieved13 September 2020.
  32. ^ab"Bringing New Use Cases and Workloads to the Cloud with Intel Graphics Virtualization Technology (Intel GVT-g)"(PDF).Intel Open Source Technology Center (Flyer).Intel. 2016. Retrieved14 August 2020.
  33. ^abJain, Sunil (4 May 2014)."Intel Graphics Virtualization Update" (Article).Intel. Retrieved13 September 2020.
  34. ^"Changelog for VirtualBox 6.1".VirtualBox.Oracle Corporation. 10 December 2019. Retrieved12 September 2020.
  35. ^"PCI passthrough via OVMF - Video card driver virtualization detection".Arch Linux Wiki (Wiki). Retrieved13 September 2020.
  36. ^"GeForce GPU Passthrough for Windows Virtual Machine (Beta)".NVIDIA Support. 2021-03-30.
  37. ^ab"PCI passthrough via OVMF - ArchWiki".wiki.archlinux.org. Retrieved2021-05-20.
  38. ^Tian, Lan (2020-06-25)."Intel and NVIDIA GPU Passthrough on a Optimus MUXless Laptop".
  39. ^Zheng, Xiao (August 2015).Media Cloud Based on Intel Graphics Virtualization Technology (Intel GVT-g) and OpenStack(PDF).Intel Developer Forum (Presentation slide).San Francisco:Intel. Retrieved14 September 2020.
  40. ^Wang, Zhenyu (September 2017).Full GPU virtualization in mediated pass-through way(PDF).XDC2017 (Presentation slide).Mountain View, California:X.Org Foundation. Retrieved14 September 2020.
  41. ^Kurkure, Uday (12 October 2017).Performance Comparison of Native GPU to Virtualized GPU and Scalability of Virtualized GPUs for Machine Learning.VMware VROOM! Performance Blog (Article).VMware. Episode 3. Retrieved14 September 2020.
  42. ^Virtual GPU Software User Guide (Guide).Nvidia. Retrieved13 September 2020.
  43. ^abWong, Tonny (28 January 2016).AMD multiuser GPU: hardware-enabled GPU virtualization for a true workstation experience(PDF) (White paper).AMD. Retrieved12 September 2020.
  44. ^Wang, Hongbo (18 October 2018)."2018-Q3 release of XenGT (Intel GVT-g for Xen)" (Press release).Intel Open Source Technology Center. Retrieved14 August 2020.
  45. ^abGVT-g Setup Guide.GitHub (Guide). Retrieved13 September 2020.
  46. ^Wang, Hongbo (18 October 2018)."2018-Q3 release of KVMGT (Intel GVT-g for KVM)" (Press release).Intel Open Source Technology Center. Retrieved14 August 2020.
  47. ^"NVIDIA Virtual GPU Software Supported GPUs".Nvidia. Retrieved9 September 2020.
  48. ^AMD FirePro S-Series for Virtualization(PDF) (Datasheet).AMD. 2016. Retrieved13 September 2020.
  49. ^"Systems/motherboards emulated".PCem (Project). Retrieved26 October 2020.
  50. ^"VMware Tools Device Drivers".VMware Tools Documentation (Manual).VMware. Retrieved12 September 2020.
  51. ^ab"Configuring Virtual Machines".Oracle VM VirtualBox User Manual (Manual).Oracle Corporation. Retrieved12 September 2020.
  52. ^"Display options".QEMU User Documentation.QEMU (Manual). Retrieved12 September 2020.
  53. ^Long, Simon (2013).Virtual Machine Graphics Acceleration Deployment Guide(PDF) (White paper).VMware. Retrieved14 September 2020.
  54. ^"OpenGL Software Accelerator".XenApp and XenDesktop 7.15 LTSR (Manual).Citrix Systems. Retrieved15 September 2020.
Retrieved from "https://en.wikipedia.org/w/index.php?title=GPU_virtualization&oldid=1307876284"
Category:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp