Download

Loss of performance when packaging

Saldations to all!
My project visualized in oculus rift is in the best performance of 90 FPS working on the UE4 engine editor, but after the finished and packaged project, out of the editor, FPS performance drops down to 50 FPS, making my product presentation unfeasible to the client .
Can you tell me if this bizarre behavior is normal?
How to maintain the same performance in the editor for the bundled product?
Thankful!

Oh it is not normal.
You should start looking into what is causing it.
Start by doing ‘stat unit’ and see if you are CPU or GPU bound. Then go from there. Use the other stat commands.

For more detailed GPU detail you can dump stats into the logfile by pressing Ctrl+Shift+comma.
For more CPU stats run the commands ‘stat startfile’ then after a few seconds ‘stat stopfile’ and then you can open this up in the ‘Session Frontend’ app provided with the engine.

Freedom, you made me a happy man,
I was terrified that this loss of performance was normal.
As I do not have the competence and knowledge to analyze these statistics, and not wanting to abuse their generosity, can I post here the statistical settings and tables of my project so that it shows where the villains are?
Thankful!

Recently I have had quite some issues with Oculus ASW. You can try to turn it off using the Oculus Debug Tool and see whether that makes any difference. With the same tool you can turn on the various diagnostic HUD’s to investigate more in details what is happening. Let’s see if we can help you fix your issue by year end. :wink:

Marco, as I said earlier, the performance of rift CV1 in the editor looks great. I’m surfing between 60 and 90 FPS comfortably, with low latency and satisfactorily. The key question is: What happens during packaging that brings down the performance of the final product? Our friend Fredrum states that this behavior is not normal, so the performance in the editor has to be equal to the final bundled product, correct?
As for the debug tool, ASW is already disabled by defaut. I usually use the performance tool to track the FPS.
I have no experience and technical knowledge to interpret the statistical data and to detect where the problem is, so I am counting on the generosity of all. I am with my product finished and working perfectly in the editor, I did not expect to be struck at the end of my work with this loss of performance on the headset.
I have taken the liberty of posting here a package of detailed information about my project so that they can help me.
Thankful!
(UE4 4.14.3)

Before we deep dive into your performance statistics, can you confirm what are the quality (scalability) settings in the Editor? Is there any chance you are using lower quality settings in the editor respect to the packaged experience?

Marco, this is the minimum configuration, reduce more would sacrifice quality.
inexpertly, the OVR server release 1.20.0.501061 started to act constantly on my system without it being able to shut it down. I installed nothing but the sdk of oculus for the rift, I do not know how it appeared.
It is running permanently shortly after windows 7 loads, non-stop, even terminating the service in the task manager, it always comes back.
Can this have any responsibility?

Not trying to hijack this, but may I ask what ASW problems you ran into? I experienced issues with jitter/stutter since around November. However, I doubt that ASW is the main culprit, but just a symptome of some other fishy things going on (maybe cause by the Win10 creator update or a GPU driver update). However, disabling ASW helps with the visibility of said annoyances.

How do you disable ASW by default? On our machines, ASW comes back on every time you restart Oculus services. I would love to disable it permanently if there’s a way.

We have been experiencing stuttering especially on side-to-side head rotations, both on 4.17/4.18 but also on old packaged experiences on 4.15/4/16. Turning AWS off seems to make it better, even if it is not completely solved.

We have been using the Oculus Tray Tool, a free utility which can set ASW (and some other parameters as well) on startup. You can find it here: https://www.reddit.com/r/oculus/comm…lus_tray_tool/

The Oculus stack consists of a number of Windows services. They are linked to each other and run pretty much constantly. If one is terminated an internal watch-dog mechanisms restarts it, so this is pretty normal. You can use the Oculus Debug Tool to take down the services or restart them if needed. Look in the Service menu.

Question: do you have on your system any application which could be interfering with DirectX? For example, NVidia’s In-Game Overlay? Or some other display post-processing utility?

Not that I know of. In this project I have accumulated in “content”, several complete packages and pluguins as: substance, tropical forest, polymodels car vol 01, fire pack, nature package, landscape automaterial, advanced glass pack, lowpolyfoliage among many others. I enjoy to ask you if everyone these assets accumulated in content could cause weight and low performance in the editor even if they are not being used in the scene. In short, only what is in the scene is being processed?
When I spoke about shutting down ASW, I understood from my experience that it was the option in the debug tool - Asynchonous Spacewarp - disable.
Can it be around or do I have to use the Oculus Tray Tool? I figured it was off already. Windows 7 GTX 1060

[USER=“335838”]pareon vr[/USER] I don’t think that is the issue. Regarding ASW, it has the tendency to go back to Auto even if you turned it off once. It is better to use the Oculus Tray Tool which will ensure it stays off. You may also want to re-install the full Oculus stack. Go over to the Oculus site and download the installer, run it then choose the Repair option. Your applications will stay in place but you will get a fresh installation to work with.

[USER=“335838”]pareon vr[/USER] Another thing to do.

  • Reboot your PC
  • Launch Oculus Home
  • Open the Oculus Debug Tool and go under Service → Logs
  • Open the latest log file (it will be the last one in the list)
  • Filter for {!ERROR!}

Do you get any strange error? Anything linked to positional tracking or cameras?

I performed the repair of the rift installation and installed the oculus tray tool by turning off the ASW.
In the debug tool, log .txt did not open, gave error (unhandled exeption). All log records are not opening.
With these actions, I noticed a little improvement with the experience packed before, I did not do another to test. However, there was no change in the FPS reading on the degug tool, there is a difference of approximately 30% between the editor and the packaged product.
As for positional cameras, if I understand you correctly, do you mean hardware? , I’m operating the rift on a clean machine, just for this purpose (Windows 7 GTX 1060) and I do not notice anything strange, because all the VR contents I’m running are working perfectly, including my project in the editor. I tested the experiment
Showdown VR Demo, comparing in the debug tool the editor and the packaged, the FPS reading was the same (90 FPS). This makes us think that the problem is occurring even during packaging.

I am wondering if this answer could apply to your case as well. I imagine you have quite a number of lights in your level: Editor vs Build performance - UE4 AnswerHub

[USER=“335838”]pareon vr[/USER] Just read through this thread again and I noted I forgot to ask a couple of very fundamental questions. Which settings, if any, did you put in your DefaultEngine.ini file to optimize for VR? Are you using the Forward Shading?

I did not optimize defautengine.ini and did not enable Shading Forward. Answering your previous question, even if I extinguish all the lights, the best I can achieve is a small increase in FPS, but the proportion of the loss of yield continues in the packaged product. Unfortunately my case did not repeat the solution found by the topic that indicated me.
Did you detect something that justified this problem in statistics, are they within normality?

Defautengine.ini

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/StarterContent/Maps/Minimal_Default
GameDefaultMap=/Game/StarterContent/Maps/Minimal_Default

[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Desktop
AppliedTargetedHardwareClass=Desktop
DefaultGraphicsPerformance=Maximum
AppliedDefaultGraphicsPerformance=Maximum

Statistic of the stat dumpframe command

ogStats: Culled to 1.000000ms, use -ms=0, for all data and aggregates.
LogStats: Stack ---------------
LogStats: Invalid - ThreadRoot
LogStats: 31.697ms ( 2) - Thread_e2c_0 - TaskGraphThreadNP 2 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 31.696ms ( 1) - Other TaskGraph Stalls - STAT_TaskGraph_OtherStalls - STATGROUP_Threading - STATCAT_Advanced
LogStats: 31.695ms ( 1) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.001ms ( 1) - OtherChildren
LogStats: 0.001ms ( 1) - OtherChildren
LogStats: 30.914ms ( 128) - Thread_c7c_0 - RenderThread - STATGROUP_Threads - STATCAT_Advanced
LogStats: 14.306ms ( 58) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 9.060ms ( 1) - FDrawSceneCommand - STATGROUP_RenderThreadCommands - STATCAT_Advanced
LogStats: 9.054ms ( 1) - RenderViewFamily - STAT_TotalSceneRenderingTime - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 2.874ms ( 1) - InitViews - STAT_InitViewsTime - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 1.507ms ( 6) - OtherChildren
LogStats: 1.367ms ( 1) - InitViewsPossiblyAfterPrepass - STAT_InitViewsPossiblyAfterPrepass - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 1.314ms ( 1) - Dynamic shadow setup - STAT_DynamicShadowSetupTime - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 1.314ms ( 32) - OtherChildren
LogStats: 0.053ms ( 3) - OtherChildren
LogStats: 2.181ms ( 47) - OtherChildren
LogStats: 1.651ms ( 1) - Base pass drawing - STAT_BasePassDrawTime - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 1.534ms ( 1) - StaticDrawList drawing - STAT_StaticDrawListDrawTime - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 1.512ms ( 1) - Self
LogStats: 0.022ms ( 28) - OtherChildren
LogStats: 0.117ms ( 2) - OtherChildren
LogStats: 1.240ms ( 5) - WholeScene Shadow Depths - STAT_RenderWholeSceneShadowDepthsTime - STATGROUP_ShadowRendering - STATCAT_Advanced
LogStats: 1.240ms ( 12) - OtherChildren
LogStats: 1.107ms ( 1) - DeferredShadingSceneRenderer Lighting - STAT_FDeferredShadingSceneRenderer_Lighting - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 1.055ms ( 1) - Lighting drawing - STAT_LightingDrawTime - STATGROUP_SceneRendering - STATCAT_Advanced
LogStats: 1.054ms ( 1) - Render Lights and Shadows - STAT_LightRendering - STATGROUP_LightRendering - STATCAT_Advanced
LogStats: 1.054ms ( 60) - OtherChildren
LogStats: 0.000ms ( 1) - OtherChildren
LogStats: 0.052ms ( 16) - OtherChildren
LogStats: 0.006ms ( 3) - OtherChildren
LogStats: 7.130ms ( 2) - SlateDrawWindowsCommand - STATGROUP_RenderThreadCommands - STATCAT_Advanced
LogStats: 6.741ms ( 2) - Present time - STAT_D3D11PresentTime - STATGROUP_D3D11RHI - STATCAT_Advanced
LogStats: 0.389ms ( 4) - OtherChildren
LogStats: 0.418ms ( 67) - OtherChildren
LogStats: 30.803ms ( 4) - Thread_10c0_0 - GameThread - STATGROUP_Threads - STATCAT_Advanced
LogStats: 30.797ms ( 2) - FrameTime - STAT_FrameTime - STATGROUP_Engine - STATCAT_Advanced
LogStats: 19.732ms ( 2) - Self
LogStats: 4.706ms ( 1) - Total Slate Tick Time - STAT_SlateTickTime - STATGROUP_Slate - STATCAT_Advanced
LogStats: 2.064ms ( 1) - Draw Window And Children Time - STAT_SlateDrawWindowTime - STATGROUP_Slate - STATCAT_Advanced
LogStats: 1.488ms ( 1) - Self
LogStats: 0.576ms ( 2) - OtherChildren
LogStats: 1.462ms ( 2) - SlatePrepass - STAT_SlatePrepass - STATGROUP_Slate - STATCAT_Advanced
LogStats: 1.462ms ( 2) - Self
LogStats: 0.000ms ( 2) - OtherChildren
LogStats: 1.179ms ( 8) - OtherChildren
LogStats: 3.781ms ( 3) - CanvasLineItem Time - STAT_Canvas_LineItemTime - STATGROUP_Canvas - STATCAT_Advanced
LogStats: 3.778ms ( 3) - Get Batched Element Time - STAT_Canvas_GetBatchElementsTime - STATGROUP_Canvas - STATCAT_Advanced
LogStats: 0.003ms ( 3) - OtherChildren
LogStats: 2.579ms ( 36) - OtherChildren
LogStats: 0.006ms ( 2) - OtherChildren
LogStats: 30.613ms ( 6) - Thread_10fc_0 - TaskGraphThreadNP 1 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 30.603ms ( 3) - Other TaskGraph Stalls - STAT_TaskGraph_OtherStalls - STATGROUP_Threading - STATCAT_Advanced
LogStats: 30.600ms ( 3) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.003ms ( 3) - OtherChildren
LogStats: 0.009ms ( 3) - OtherChildren
LogStats: 30.494ms ( 3) - Thread_e28_0 - PoolThread 0 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 30.494ms ( 3) - FQueuedThread::Run.WaitForWork - STAT_FQueuedThread_Run_WaitForWork - STATGROUP_ThreadPoolAsyncTasks - STATCAT_Advanced
LogStats: 30.483ms ( 3) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.011ms ( 3) - OtherChildren
LogStats: 30.434ms ( 14) - Thread_cac_0 - StatsThread - STATGROUP_Threads - STATCAT_Advanced
LogStats: 28.205ms ( 12) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 2.229ms ( 1) - StatsNew Tick - STAT_StatsNewTick - STATGROUP_StatSystem - STATCAT_Advanced
LogStats: 2.120ms ( 1) - Add To History - STAT_StatsNewAddToHistory - STATGROUP_StatSystem - STATCAT_Advanced
LogStats: 1.787ms ( 1) - Broadcast - STAT_StatsBroadcast - STATGROUP_StatSystem - STATCAT_Advanced
LogStats: 1.783ms ( 1) - HUD Group - STAT_HUDGroup - STATGROUP_StatSystem - STATCAT_Advanced
LogStats: 1.421ms ( 1) - Condense - STAT_StatsCondense - STATGROUP_StatSystem - STATCAT_Advanced
LogStats: 0.362ms ( 63) - OtherChildren
LogStats: 0.004ms ( 1) - OtherChildren
LogStats: 0.333ms ( 1) - OtherChildren
LogStats: 0.109ms ( 3) - OtherChildren
LogStats: 0.000ms ( 1) - OtherChildren
LogStats: 30.330ms ( 3) - Thread_d04_0 - PoolThread 1 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 30.330ms ( 3) - FQueuedThread::Run.WaitForWork - STAT_FQueuedThread_Run_WaitForWork - STATGROUP_ThreadPoolAsyncTasks - STATCAT_Advanced
LogStats: 30.315ms ( 3) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.015ms ( 3) - OtherChildren
LogStats: 30.120ms ( 2) - Thread_10f4_0 - TaskGraphThreadNP 0 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 30.119ms ( 1) - Other TaskGraph Stalls - STAT_TaskGraph_OtherStalls - STATGROUP_Threading - STATCAT_Advanced
LogStats: 30.118ms ( 1) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.002ms ( 1) - OtherChildren
LogStats: 0.000ms ( 1) - OtherChildren
LogStats: 29.985ms ( 3) - Thread_c1c_0 - PoolThread 4 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 29.985ms ( 3) - FQueuedThread::Run.WaitForWork - STAT_FQueuedThread_Run_WaitForWork - STATGROUP_ThreadPoolAsyncTasks - STATCAT_Advanced
LogStats: 29.982ms ( 3) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.004ms ( 3) - OtherChildren
LogStats: 29.771ms ( 5) - Thread_1684_0 - RTHeartBeat 9 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 29.771ms ( 5) - CPU Stall - Sleep - STAT_Sleep - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 29.769ms ( 3) - Thread_d0c_0 - PoolThread 3 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 29.769ms ( 3) - FQueuedThread::Run.WaitForWork - STAT_FQueuedThread_Run_WaitForWork - STATGROUP_ThreadPoolAsyncTasks - STATCAT_Advanced
LogStats: 29.766ms ( 3) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.004ms ( 3) - OtherChildren
LogStats: 29.769ms ( 3) - Thread_103c_0 - FAsyncWriter_ProjetoBasico - STATGROUP_Threads - STATCAT_Advanced
LogStats: 29.769ms ( 3) - CPU Stall - Sleep - STAT_Sleep - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 29.769ms ( 3) - Thread_1644_0 - ShaderCompilingThread - STATGROUP_Threads - STATCAT_Advanced
LogStats: 29.769ms ( 3) - CPU Stall - Sleep - STAT_Sleep - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 29.599ms ( 3) - Thread_e24_0 - PoolThread 2 - STATGROUP_Threads - STATCAT_Advanced
LogStats: 29.599ms ( 3) - FQueuedThread::Run.WaitForWork - STAT_FQueuedThread_Run_WaitForWork - STATGROUP_ThreadPoolAsyncTasks - STATCAT_Advanced
LogStats: 29.591ms ( 3) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.008ms ( 3) - OtherChildren
LogStats: 29.595ms ( 3) - Thread_1164_0 - FUdpMessageProcessor - STATGROUP_Threads - STATCAT_Advanced
LogStats: 29.595ms ( 3) - CPU Stall - Wait For Event - STAT_EventWait - STATGROUP_CPUStalls - STATCAT_Advanced
LogStats: 0.001ms ( 1) - OtherChildren

Ok, here what I believe it is happening. You are able to hit your target frame rate in the Editor because of the way your scalability settings are set up in it. When you package your experience, the scalability settings go back to default and you achieve a much lower frame rate because UE4 attempts a higher quality overall.

The good news is that you can explicitly set your scalability settings using the Execute Console Command node so you are consistent between the Editor (PIE) and the packaged experience. You can refer to the documentation here to know which variables to set: Scalability Reference | Unreal Engine Documentation

Attach a series of Execute Console Command nodes to your level’s Begin Play and you are good to go. In the end it should look something like this. Just set the values depending on the scalability level you want to match.

image_40709.jpg

As an alternative you can use the DefaultEngine.ini file to do tweak some more granular settings. Since you are using version 4.14.x (which is rather old) I am attaching the ini file from the Showdown Demo, which was created with that version.

Hope this helps!