Skip to main content
Up and Coming
March 31, 2017

VR.WaitForGPU killing performance in Unity3D. Very difficult to profile other issues. Video Example

  • March 31, 2017
  • 13 replies
  • 14601 views
Here is a video showing what the issue is
https://youtu.be/n5ngEzZSKH0

I'm trying to release an update to Vanguard V but perforance has become a real issue.  The game runs at 150fps on my laptop but the framerate tanks when I touch the Oculus headset.  I get these nasty yellow spikes and the FPS tanks to the 50s, even on my desktop (980 GTX TI).  I then created a new scene with nothing but a camera and the default Directional Light.  The framerate goes into the 800s until I touch the headset.  It then tanks again to 90-100fps.  This is an empty scene.

Now, if this is by "design" it has made it very difficult to isolate any real issues in the profiler.  Any help would be great.

Unity 5.5.1f1 and observed in Unity 5.5.2 as well
Windows 10 x64




13 replies

RaveTZAuthor
Up and Coming
March 31, 2017
I believe this is caused by Asynchronous Space Warp locking the framerate to 45 if it dips below 90.  This is problematic because ASW stays on for a duration and causes the game to slow down for a notable period.  Is there any way to disable ASW?  This all or nothing approach is not working well for us.



Inspiring
March 31, 2017
VR.WaitForGPU basically means that your frames are taking too long to render. To maintain 90fps, you need to be < or about equal to 11.1 ms per frame (1000ms/s / 90 frames/s = 11.11111). Both your CPU and GPU values are above that. So VR.WaitForGPU is not killing performance - that function is actually the CPU saying that it needs to wait some amount of time for rendering to finish before it can send new data to the GPU. If you want to address this, you need to look at how much you are trying to render each frame and reduce/optimize where possible. 
RaveTZAuthor
Up and Coming
March 31, 2017


VR.WaitForGPU basically means that your frames are taking too long to render. To maintain 90fps, you need to be < or about equal to 12ms per frame (1000ms/s / 90 frames/s = 11.11111). Both your CPU and GPU values are above that. So VR.WaitForGPU is not killing performance - that function is actually the CPU saying that it needs to wait some amount of time for rendering to finish before it can send new data to the GPU. If you want to address this, you need to look at how much you are trying to render each frame and reduce/optimize where possible. 


Then why is it still there in an empty scene with nothing to render at all?
RaveTZAuthor
Up and Coming
March 31, 2017
Here is a video of the title in action with the issue at hand
https://youtu.be/wMvn_KTPfb8
Inspiring
March 31, 2017
When the headset is active, frame-rate is being locked/synched to 90fps, even if your cpu/gpu could push further. It's a similar principle to having v-sync enabled on a monitor.
RaveTZAuthor
Up and Coming
March 31, 2017


When the headset is active, frame-rate is being locked/synched to 90fps, even if your cpu/gpu could push further. It's a similar principle to having v-sync enabled on a monitor.


And there is the problem.  ASW is locking it to 45 for a duration every time it has a slight dip below 90.
New Participant
September 6, 2017
Hi guys,

I'm experiencing the same issue here. I have a scene in which nothing is happening, the FPS is something like 160 FPS. As soons as I wear the Oculus headset the FPS drop to 45 FPS. Nothing has changed in the scene, no events have been triggered, no animations have been played, nothing. Just wearing the Oculus headset make the FPS drop.

Any idea why ?

Thanks
Up and Coming
October 10, 2017
same problem for me, this is locking me the possibility to pass check test on the store.
any answer is welcome !
B lackant Master Studio
Inspiring
October 25, 2017

RaveTZ said:

Then why is it still there in an empty scene with nothing to render at all?

And why are builds so much faster as well (~40% increase) ?
 
Same problem here with a Vive/Unity 2017.2.
Fixing that issue would make my daily routine much much more enjoyable...

Inspiring
October 26, 2017

RaveTZ said:



When the headset is active, frame-rate is being locked/synched to 90fps, even if your cpu/gpu could push further. It's a similar principle to having v-sync enabled on a monitor.


And there is the problem.  ASW is locking it to 45 for a duration every time it has a slight dip below 90.


If it dips below 90 it is by design going to halve the locked FPS rate, to 45, because the goal is to avoid any frame tearing on the display. This is similar to how consoles will dance between 60/30 FPS to prevent frame tearing.

Do you get drops to 45 in an empty scene?