Share

Vulkan Multi-GPU

Vulkan Multi-GPU support allows you to use two graphics cards in stereo rendering modes and XR, improving frame rates. This functionality is available from VRED 2027 onwards when using the Vulkan renderer.

To use Vulkan Multi-GPU support, you need two graphics cards in an SLI configuration, VRED 2027 or later, and the Vulkan renderer. Vulkan Multi-GPU only works in stereo rendering modes and XR.

How to Setup Multi-GPU

Multi-GPU is used automatically in the Vulkan renderer when the requirements are met and a stereo rendering mode or XR is active.

Multi-GPU can be enabled or disabled with the setUseMulticastSLI Python command:

    setUseMulticastSLI(1)  # Enable Multi-GPU
    setUseMulticastSLI(0) # Disable Multi-GPU    

Multi-GPU Performance Gains

When using Multi-GPU in a stereo rendering mode, each GPU renders one eye, parallelizing the work. But some synchronization is needed between the two GPUs, which causes some overhead. Understanding this balance can help you decide whether to use Multi-GPU or not.

Usually, an improvement between 50% and 75% can be expected when using Multi-GPU in stereo rendering modes, compared to using a single GPU.

The main overhead of Multi-GPU is transferring the result image from the secondary GPU to the primary GPU. Two factors influence the amount of overhead: the resolution of the rendered image and the speed of the connection between the two GPUs. The higher the resolution, the more data needs to be transferred, and the slower the connection, the more time it takes to transfer the data. If this transfer takes more time than the time it takes to render both eyes on a single GPU, then using Multi-GPU will not provide a performance gain.

Performance Gain Example

We will use an example to illustrate this balance. Our setup would be two GPUs connected to a PCIe 4.0 bus and we will be rendering to a headset that has a resolution of 4096x4096 (16 megapixels) per eye. The amount of data that needs to be transferred from the secondary GPU to the primary GPU is:

16 megapixels * 12 bytes per pixel = 192 megabytes

The time it takes to transfer this data depends on the speed of the connection between the two GPUs through the PCIe bus. Two GPUs in SLI on a PCIe 4.0 bus can achieve a transfer speed of about 25 GB/s. So the time it takes to transfer the data is:

92 megabytes / 25 GB/s = 7.5 milliseconds

If rendering both eyes takes less than 7.5 milliseconds, then using Multi-GPU will not provide a performance gain, as the overhead of transferring the data will outweigh the benefits of parallel rendering. That will happen if the frame rate is over 133 FPS (1000 ms / 7.5 ms) when rendering both eyes on a single GPU. If the frame rate is lower than that, then using Multi-GPU can provide a performance gain, in this example.

Multi-GPU Troubleshooting

If you are not seeing the expected performance gain when using Multi-GPU, you can check the following:

  • Make sure your GPUs are properly configured in SLI mode and that your system recognizes both GPUs. You can do this from the NVIDIA Control Panel, in the Set SLI and PhysX configuration section. The option Maximize 3D performance should be selected, and it should show that SLI is enabled.

    The VRED console should show device groups when initializing the Vulkan renderer. This indicates that VRED has detected multiple GPUs and is using them for rendering. If you don't see this message, it may indicate that VRED is not using Multi-GPU, and you should check your SLI configuration. The message should look like this:

      Physical Device Group with 2 devices
      |- Device 0: NVIDIA RTX A6000
      |- Device 1: NVIDIA RTX A6000
      ========== Create Device Group with 2 devices
  • Verify that both GPUs are being utilized. You can use Windows Task Manager or the tools in the NVIDIA Control Panel in the Manage GPU Utilization section. When rendering to an XR headset or in a stereo rendering mode, both GPUs should show significant utilization. If one GPU is not being utilized, it may indicate an issue with your SLI configuration or that Multi-GPU is not being used.

  • Make sure you did not disable Multi-GPU with the setUseMulticastSLI Python command. You can check the current state of Multi-GPU with the getUseMulticastSLI Python command.

  • You can compare the performance with Multi-GPU enabled and disabled to see if there is a difference. Do this by toggling Multi-GPU with the setUseMulticastSLI Python command and measuring the frame rate in both cases. It is useful to do these measurements with V-Sync disabled, as V-Sync limits your frame rate to the refresh rate of your display. You can do this with the setVSyncInterval Python command:

      setVSyncInterval(0)  # Disable V-Sync
      setVSyncInterval(1)  # Enable V-Sync
  • Large resolutions and high frame rates can lead to a situation where the overhead of transferring data between the GPUs outweighs the benefits of parallel rendering. In this case, you may not see a performance gain when using Multi-GPU. You can try reducing the resolution to see if that improves performance when compared against a single GPU. Also check that the connection between the GPUs is the fastest that it can be, for example by using PCIe 5.0 on GPUs that support it, and that the correct PCIe slot is used for the GPUs. If the frame rate is already very high with one GPU, you can disable Multi-GPU with the setUseMulticastSLI Python command.

Was this information helpful?