cancel
Showing results for 
Search instead for 
Did you mean: 

Performance regression in 5.5.2p1 and up, fixes itself when taking off the headset.

JasperdeLaat
Honored Guest
Hello,

We're having a rather unusual problem on Snapdragon-based devices, where our game's performance seems to have gotten worse after upgrading to any Unity 5.5 version from 5.5.2p1 and up (coming from 5.5.0p3). Basically, when entering a reasonably heavy-duty scene that used to run perfectly fine (94k tris, 167 vertices, 55 batches), the framerate dropped to a consistent 54-58 fps. 
What makes it even stranger is that when you take the headset off, and put it back on again after the game hibernated due proximity sensor, the framerate restores to 60 fps.

We tested various phones, and the ones that are - at least - affected are the Snapdragon powered SM-935A S7 and SM-950U S8 devices. The issue seems especially present on Snapdragon chipsets, where Exynos chipsets (like the SM-950F S8) appear to run just fine.

Me and my colleague (who is also on this forum as lholstvg), have performed various tests. Changing CPU and GPU levels at runtime didn't really seem to have a big impact. However, when we changed the eye texture render scale, we saw a speedup.
Next, we profiled the phone using the Snapdragon profiler, these are the results:
dri9h3rt5r9y.png
Notice that the "% Stalled on System Memory" is at a lower percentage when putting on the headset again. So we've found two things:
1. Memory access appears to be the bottleneck.
2. It somehow fixes itself after the app is suspended by taking the headset off and putting it back on again.

We took an additional, more detailed look at memory:
zvedpq3009fl.png
Notice that although memory usage doesn't seem to have changed very much, both read and write speeds go up considerably, explaining what solves the issue of lower framerate.
(All these tests were performed on Unity 5.5.4p1, which contains the fix for the broken big.LITTLE calculations affecting Snapdragon S8's)

At this moment we know:
1. Since Unity 5.5.2p1, our game runs slower than before.
2. There was a neglectable improvement when increasing both CPU and GPU levels through OVRManager.cs
3. The Snapdragon profiler indicated a high percentage of system memory stalls, which restores to normal values upon putting the headset off and on again.

However, at this point, our options end here. I hope anyone from Oculus can assist us further to mitigate this problem.
2 REPLIES 2

lholstvg
Explorer
Note that taking off the headset and putting it back on again only improves the framerate on the S8.

JianZ
Expert Protege
This problem should be fixed under Unity Patch release 5.5.5p1 and 5.6.3p2.

The reason is that a extra stencil clear was introduced on fullscreen buffer causing a huge amount of gpu buffer resolving time.