Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question VR bottlenecked by PCIe bandwidth? [OpenXR]

Discussion in 'VR' started by ChrisVMC, Sep 14, 2023.

  1. ChrisVMC


    Jun 22, 2020
    I've done a bunch of testing and the only thing that correlates with a performance problem I'm trying to resolve is PCIe bandwidth. PCIe 3.0 8x does not cut it. Conventional wisdom for non-VR seems to be that 8x to 16x makes very little difference. But that's not the case with VR from my testing (at least with our sim).

    Basically our sim was performing poorly on a Vive Pro 2 on a client's computer (Roughly 50-75% slower than similar spec'd test system). Computer is reasonably spec'd and doesn't seem to have anything running in the background causing problems. On multiple worse spec'd computers I am getting better performance using Vive Pro and Valve Index.

    Borrowed a Vive Pro 2 and did further testing. Performance is worse than Index or Vive Pro, but only by 25-30% and that gap shrank to about 10% after adjusting the rendering scaling to get render texture sizes closer to the Vive Pro and Index.

    A bunch of extra testing and the only factor I couldn't easily replicate was the client machine having a crappy PCIe 3.0 slot that is only 8x rather than 16x. Nothing I have has an 8x slot. I did have a secondary 4x slot in another machine and that made things 150-200% worse. Nothing unexpected there as 4x PCIe is easy enough to saturate even without VR.

    Without an 8x slot that best I could come up with was forcing the PCIe slot of a board to 2.0 at 16x to get roughly equivalent bandwidth to 3.0 at 8x. This gets me very similar performance to the client machine.

    So I seem to have found the problem. But I'm not sure how (or if) I can improve the performance without saying PCIe 3.0 16x is a requirement for good performance.

    Obviously I could do some general optimisation, but I can't find a lot of info about expected PCIe bandwidth requirements for VR. Typically the GPU is spending 5-8ms rendering on a 2070 in our sim. So we're not exactly pushing the limits.

    I've got profiling to do to dig further into this but I don't have clear expectations as to what is reasonable/expected with regard to this so I thought I'd ask for suggestions/opinions before I go crazy and find out it's just the normal expected behaviour. We're really not doing anything complicated rendering wise (Original pipeline not URP or HDRP). Worst case maybe 1.5m triangles. Standard shaders, no shadows.

    Are we doing something horribly wrong? Any pointers to likely culprits? Is this typical with OpenXR and Unity? Or VR in general?