Skip to main content
September 24, 2015

5.1.2p2 -> 5.2.1f1 - Large Performance Loss

Long post short (i.e. tl;dr;): Avoid 5.2.1 for now. Major performance loss. I'm sure nobody will read the rest of this since Oculus Connect is happening now, but if you want more details, read on!

Just a heads up for those who are tempted to try 5.2.1 that came out 2 days ago. I'm seeing a large performance drop, similar to what was seen when moving to 0.1.0 utils and away from legacy integration. That performance drop was fixed in 5.1.1p3 -> 5.1.2p2, but now something worse seems to have happened 5.1.2p2 -> 5.2.1f1.

I had previously posted these "benchmark" results in the "Oculus Utilities for Unity 0.1.0 Beta released" topic when I was seeing issues with 5.1.1p3 + 0.1.0 utils. This benchmark is a measure in ms of how much CPU time is left for your own scripts outside of rendering a fairly complex scene. I put this together so I could track how Unity + Oculus runtimes improved or degraded over time. It involves a script that acts as fake CPU load, that allows adjusting ms of CPU load until frame skips and judder kick in. This essentially calculates the performance overhead you have. Here were my previous results from the other post:

5.1.1p3 + 0.1.0 Utils: 6.0ms
5.1.1p3 + 0.5.0.1 Legacy Integration: 9.0ms
5.1.2p2 + 0.1.0 Utils: 7.9ms
5.1.2p2 + 0.5.0.1 Legacy Integration: 9.0ms

New data for 5.2.1:
5.2.1f1 + 0.1.0 Utils: 4.0ms

Not good. Can't do much with 4ms of CPU time. I'm rolling back to 5.1.2p2. Unfortunately this means the 0.7 features can't be used as that is what 5.2.1 offered up:

http://unity3d.com/unity/whats-new/unity-5.2.1

VR: Oculus: Upgraded to 0.7 dependencies.
VR: For Windows Oculus Development, the Oculus 0.7.0.0 runtime is required in order to run in VR mode. Future releases will also require this runtime going forward.

I did verify the performance monitor HUD is working now in 5.2.1f1, but unfortunately it just tells me the performance sucks. :)

I'm starting to cringe every time a new SDK version and/or Unity version comes out.

ccs
    This topic has been closed for replies.

    58 replies

    October 1, 2015
    Hi Svenviking-

    Have you tried 5.1.2p2 + 0.1.0 utils or 5.1.3p2 + 0.1.0 utils? Those are the best combos I have found so far since moving away from 0.5.0.1 legacy integration. I did experience some loss of performance going from 0.5.0.1 legacy to 0.1.0 utils as well, but it wasn't a huge change (see numbers in 1st post here). I decided I could live with it, and didn't really have much choice since legacy integration is no longer supported.

    I'm more concerned about loss in performance in new unity versions that are utilizing 0.7 plugin. The ones using 0.6 plugin (5.1.3p2 or 5.1.2p2) seem to work quite well.

    ccs
    Inspiring
    October 1, 2015
    Thanks -- I've tried 5.1.2f1 but I don't remember whether I checked the patch versions you mention thoroughly. I'll give it a go. 5.1.x broke lightmapping support for the mobile shaders I was using (fixed in 5.2.x), but that's only an inconvenience.

    With PC runtimes starting to drop support for older versions, though, I'm concerned that sticking with an older Unity version long-term may not be an option.

    Edit: Does your 'benchmark' project contain anything private, by the way? If not, any chance you could send it to me? I'd just be interested to testing a couple of the even older Unity versions as well.
    Scorched Battalion - VR Jam edition available for Gear VR and DK2 (Win/Mac/Linux) Jungle Juice Sven Co-op
    Inspiring
    October 2, 2015
    @ccs, I took the model and script from your scene and built a new project in Unity 4 because your original project didn't back-port cleanly to U4. I then tested my project in 4.6.8p2, 5.1.2f1, 5.1.3p2, 5.1.3p3, and 5.2.1p2. Here are my findings:

    4.6.8p2, 12.1ms,
    5.1.2f1, 8.8ms,
    5.1.3p2, 10.8ms,
    5.1.3p3, 11.2ms,
    5.2.1p2, 11.2ms,
    October 2, 2015
    Hi Dave-

    When you created new project/scene to support 4.6.8 did you:

    1. keep the 3 lights in the scene?
    2. set quality to highest possible with 8x MSAA on? (this performance loss reminds me of that earlier MSAA bug)
    3. use linear lighting?
    4. have shadows on very high res?

    Your numbers are pretty high indicating the scene rendering was not very complex and that may be why it looks better. I'm using similar class GPU to your 970.

    Perhaps you could test my exact project in 5.1.3p2, and then test my exact project in 5.2.1p2 and re-post the results.

    Thanks
    ccs
    October 2, 2015
    Svenviking or anyone else that wants to try out my performance "benchmark" project, here it is:

    https://www.dropbox.com/s/9909zszlo5oma ... 2.zip?dl=0

    It includes a Star Trek Enterprise model found on http://www.trekmeshes.ch/ (sorry don't remember which one) in a scene lit with 3 lights and linear color space.

    To use it, simply build & run, and once running, face the model (position tracking is disabled to make benchmark more consistent). Then pan your head back and forth while holding left trigger to decrease fake CPU time, or right trigger to increase fake CPU time. The UI element displays the current fake CPU load in ms. What I try to do is set the fake load as high as possible without experiencing any judder while panning head left to right. Then I record that number as the benchmark result. You can also use the Performance monitor that is open by default to track frame rate and look for dips or missed frames.

    Maybe others can try it and post the results on their machines with various Unity versions.

    ccs
    Inspiring
    October 2, 2015
    Here are my findings with your actual project.
    5.1.2f1, 8.03ms,
    5.1.3p2, 8.52ms,
    5.1.3p3, 8.26ms,
    5.2.1p2, 8.53ms,
    October 2, 2015
    Well crap. If you can't replicate the issue, I'm not sure how it is going to get fixed. :(

    Was that with 0.1.0 utils or the upcoming utils?

    Time for me to try my other machine to see if it has same issue.

    Thanks
    ccs
    Inspiring
    October 2, 2015
    Just tried out your project, ran these back to back. I noticed that having Unity open in the background (with your test project loaded, but never "Played") seemed to have a significant effect on the results:

    Unity 5.2.1p1: 6.7 (4.8 if Unity 5.1.3p2 is still open and minimized, 4.2 is Unity 5.2.1p1 is still open and minimized)
    Unity 5.1.3p2: 8.0 (7.6 if Unity 5.1.3p2 is still open and minimized, 7.8 if Unity 5.2.1p1 is still open and minimized)

    Runtime 0.7 / GTX 970 / i7-3770
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    October 2, 2015
    That was with a totally unmodified project. Same background apps running in all measurements.
    October 2, 2015
    Awesome! Thanks Drash! So I'm not crazy! And great observation about keeping editor open. I was leaving it open. Let me try some new numbers with it closed during the testing. I wonder if it has to do with compositor.

    BTW - the project I posted defaults to x86 for build, but I actually built with x86-64 for the benchmarks I posted.

    ccs