Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Burst Issues
#1
The stupid decision of Unity to hide required packages used by Obi, but still installed with Burst/Jobs...
sorry for them making it harder to handle the burst backend.

Anyway, I noticed some of the examples have major issues using the burst backend.

Cloth - Wind
Softbody - Barrels
*a few others, assume common issues

These run at best 2FPS+

Something seems broke with the Burst backend in some samples. (most run great)

Is this a known issue?
I can provide more info if can't be reproduced.

Oni backend works great on all the samples.


*system info - AMD 3900x, 2080 Super,64gig ram
Reply
#2
(09-05-2021, 03:25 AM)_BOCS_ Wrote: The stupid decision of Unity to hide required packages used by Obi, but still installed with Burst/Jobs...
sorry for them making it harder to handle the burst backend.

Anyway, I noticed some of the examples have major issues using the burst backend.

Cloth - Wind
Softbody - Barrels
*a few others, assume common issues

These run at best 2FPS+

Something seems broke with the Burst backend in some samples. (most run great)

Is this a known issue?
I can provide more info if can't be reproduced.

Oni backend works great on all the samples.


*system info - AMD 3900x, 2080 Super,64gig ram

Make sure you’ve disabled the jobs debugger, as it takes up a lot of performance. See:
http://obi.virtualmethodstudio.com/tutorials/

From our faq:


The Burst backend runs very slow compared to the default one (Oni). Is this a bug?

Having the jobs debugger/leak detection/Burst timings enabled in-editor will degrade performance of any Burst-compiled jobs considerably. Our of these three, the one that impacts performance the most is the jobs debugger. Make sure you disable it for normal performance while running inside the editor. See the manual page regarding backends.
Reply
#3
Thanks, I did turn them off (safety/debug/leak)...
However I didn't notice that reloading the project Unity will re-enable debugger and safety checks, only Leak is saved between reloads.

I did add some code to remind  to remind me in ObiSolverEditor.cs Sonrisa
maybe something to consider adding?


Code:
#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS)

            if (backend.enumValueIndex == (int)ObiSolver.BackendType.Burst)
            {
                if (Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobDebuggerEnabled)
                    EditorGUILayout.HelpBox("Burst Jobs Debugger will cause performance issues in editor.", MessageType.Warning);

                if (!Menu.GetChecked("Jobs/Burst/Safety Checks/Off"))
                    EditorGUILayout.HelpBox("Burst Safety Checks may cause performance issues in editor.", MessageType.Warning);
            }
#endif
Reply
#4
The jobs debugger affects any Burst code in your project, not just Obi. It's funny when you think DOTS motto is "performance by default", however in-editor performance is terrible by default, since the debugger re-enables itself every single time. I will consider adding this warning in upcoming updates, just to save the suprise to anyone that's not used to Burst. Thanks! Sonrisa

There's lots other stuff in the editor that can affect performance. Having the profiler enabled also eats away 5-10% performance, having deep profiling enabled will very negative affect performance too, etc. These affect any code running in editor, not just Obi.

Also be mindful of your timestep settings. Unity's default max fixed timestep (0.33) is very prone to causing death spiraling on physics intensive scenes. I generally recommend setting it to 2-3 times your fixed timestep. So if you are using a timestep of 0.02, set max fixed timestep to 0.04-0.06. That will ensure 2 or 3 physics steps are done per frame, not more.
Reply