Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Performance with Burst on is very bad
#5
(13-03-2024, 03:37 PM)ShawnF Wrote: Hey, just wanted to ping this again since I think the thread may have gotten forgotten.

Yes, it flew under my radar - thanks for bumping it, and please accept my apologies!

(13-03-2024, 03:37 PM)ShawnF Wrote: Do you think it's worth the effort of moving all the ropes to share one solver? Would that make a difference?

It will save up some memory, but performance wise there should not be any discernible difference.

(13-03-2024, 03:37 PM)ShawnF Wrote: Anyway, here's the profile data. I ran it in an almost empty level with just the basic game manager / player stuff and a bunch of ropes.
Oni: https://drive.google.com/file/d/1U3mr45Z...drive_link
Burst: https://drive.google.com/file/d/1ehNKe2u...drive_link

Both sessions seem to be profiling completely different scenes? In the Oni one there's around 12 ropes, but only 3 in Burst?... it's pretty difficult to compare performance in these conditions.

Also according to your profiling data, Burst seems to be consistently faster than Oni by a small margin - even with deep profiling enabled. I'm not sure why you're experiencing the opposite? Note that the performance difference between both backends isn't huge (except on mobile platforms, where Burst is clearly faster) since both use very similar technology: Oni is hand-written multithreaded/vectorized code that comes precompiled, while Burst is auto-vectorized and compiled when building the standalone. At the end of the day however, both make use of multiple threads and SIMD.

Keep in mind that deep profiling injects a lot of extra measurement calls in C#, making it run a lot slower than usual. Oni is unaffected by this since it's precompiled C++, so Unity is unable to add any extra stuff into it. As a result, Burst's performance is hindered a lot more by deep profiling than Oni's.

Here's screenshots from your profiling sessions:

Oni: 8.1 ms/frame
[Image: FI0bLd8.png]

Burst: 4.7 ms/frame
[Image: 79KIyvl.png]

In the Burst one you can see that the work done by Burst (thin aquamarine lines at the bottom) takes less time than the work done by Oni in the top screenshot, however there's a lot more waiting time between actual work, due to the profiling overhead. Subtracting the time worker threads spend waiting from the total time, Burst is faster than Oni. But then again, there's less ropes in the Burst scene so any comparisons are moot.

To hone in on smaller differences, it would be important to profile the *exact same* scene using both. Otherwise it is hard to extract conclusions, since the work done by each backend is completely different.

kind regards,
Reply


Messages In This Thread
Performance with Burst on is very bad - by ShawnF - 13-03-2024, 11:19 AM
RE: Performance with Burst on is very bad - by josemendez - 19-03-2024, 07:57 AM