Multiple GPU Support in VDMX
Most of the video processing in VDMX happens on a part of the computer known as the graphics card, also known as the GPU, which is optimized for generating and manipulating image data and displaying it on screen very quickly.
For systems that contain more than one GPU, the setting for specifying which is actively being used for rendering can be found in the VDMX Preferences under Rendering.
{% include image.html file="vdmx/GPU_prefs.png" alt="Selecting render GPU in VDMX preferences" max-width="720" caption="Selecting render GPU in VDMX preferences" %}
Notes For Using Multiple GPUs With VDMX
The choice of which GPU to use for rendering may vary depending on the particular use case.
The following important notes should be taken into consideration for VDMX:
- To get the absolute best performance out of your system, all displays (including any used for previewing video streams) should be connected to the same GPU, including using the built-in display for laptops.
- While eGPUs may have better specifications for generating and processing images (eg applying FX / compositing layers), because of the bandwidth limitations of Thunderbolt 3 the amount of video that can be uploaded to the GPU (eg movie playback) is limited compared to using an integrated or discrete GPU that is built-into the system. Similar bandwidth limitations may come into play when transferring data back from the eGPU for operations such as movie recording and BlackMagic/NDI® output. Further discussion can be found in the section below.
eGPU vs Integrated / Dedicated GPUs
For things like VR, where you are typically just sending a few image textures and lots of shaders, and you only need to display the output in one place, eGPUs can be pretty amazing... for live visual performance, they've got some pros and cons.
“In general, external GPUs are more powerful than many built-in GPUs (integrated or discrete). However, external GPUs typically have a lower bandwidth than built-in GPUs. Thus, data transfers between a system and an external GPU can be more expensive than data transfers between a system and its built-in GPUs. Additionally, data transfers between GPUs incur a significant cost because this process typically requires intermediary data transfers to the system; data can't be transferred directly between GPUs.”
Though not in all cases, when purchasing a Mac to use with VDMX you may want to strongly consider getting a high end built-in GPU option instead of, or in addition to, an eGPU to avoid potential bandwidth issues. This is particularly true for systems such as iMacs and MacBook Pros which have built-in displays which are often used for preview and may incur a slow down when sharing textures between GPUs. Though an eGPU will almost always likely outperform for rendering real-time generators and FX processing, when pushed to the limits for basic playback multiple layers of 4k Ultra-HD (and bigger) movie playback, a low end integrated card may out perform a powerful eGPU connected over Thunderbolt 3 due to the amount of image data being transferred.
To give you an idea of the numbers, the max bandwidth for Thunderbolt 3 is 40 gbits/sec, compared to 80 or 160 gbits/sec for a discrete built-in GPU. An uncompressed RGBA 1920x1080 video stream @ 60 fps is about 3.98 gbits/sec. (Note that in some cases, such as with HAP or h.264, image data maybe transferred in a compressed format that is handled by the GPU)
Notes From Apple On Using Multiple GPU Systems and eGPUs
For those who are curious to learn more about multiple GPU systems on a technical level, Apple provides a guide explaining GPU Bandwidth that includes some excellent notes about recommended and not recommended setups, particularly when dealing with eGPUs.
The TL;DR of this document is:
There are three types of GPUs and bandwidth is largely determined by the bus that connects a GPU to a system. This bus varies according to different types of GPUs:
- Integrated GPUs are built-in GPUs that use the same system memory and bus as the CPU; they don't have a have a separate interface.
- Discrete GPUs are built-in GPUs that are connected to a system by an internal PCIe bus. Depending on the specific GPU and Mac model, this type of bus can have a width of 8 (PCIe x8) or 16 (PCIe x16) memory lanes.
- External GPUs are connected to a system by an external Thunderbolt 3 bus.
PCIe x16 has twice as much bandwidth as PCIe x8 and four times as much bandwidth as Thunderbolt 3.
{% include image.html file="vdmx/egpu_to_display.png" alt="eGPU to external display" max-width="720" caption="Recommended vs Not Recommended GPU Rendering For External Display" %}
“An example is a Mac with a discrete GPU, connected to an external GPU that's also connected to an external display (where the external GPU drives the external display). If a drawable is rendered with a discrete GPU, the system has to transfer this drawable to the external GPU via the Thunderbolt 3 bus. To avoid this transfer, the drawable should instead be rendered with the external GPU.”
For additional setup instructions and troubleshooting information for eGPUs on the macOS consult the Use an external graphics processor with your Mac guide from Apple.