Obi Official Forum
Poor Sample Performance - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Poor Sample Performance (/thread-663.html)

Pages: 1 2


Poor Sample Performance - Armadous - 25-08-2018

Hi, I just bought Obi Fluid and I'm having issues with very poor performance inside Unity. Most of the samples quickly fall below 15 fps and it seems that collisions are breaking down, especially with thick fluids. Running a release builds of the sample projects also didn't help.

https://i.imgur.com/SWJA8yl.gifv

My cpu is far from modern however I expected  it to capable of running reasonable scenes, especially the samples. I have an 8 core AMD FX-8150 3.6GHz. I'm running windows 10, 16gigs of ram, and a GTX 1080 Ti.


RE: Poor Sample Performance - josemendez - 27-08-2018

(25-08-2018, 07:34 PM)Armadous Wrote: Hi, I just bought Obi Fluid and I'm having issues with very poor performance inside Unity. Most of the samples quickly fall below 15 fps and it seems that collisions are breaking down, especially with thick fluids. Running a release builds of the sample projects also didn't help.

https://i.imgur.com/SWJA8yl.gifv

My cpu is far from modern however I expected  it to capable of running reasonable scenes, especially the samples. I have an 8 core AMD FX-8150 3.6GHz. I'm running windows 10, 16gigs of ram, and a GTX 1080 Ti.

Hi,

That is not normal at all, the scene shown in the gif runs at around 80 fps in a modest 4-core CPU. Can you share a pic of the profiler?


RE: Poor Sample Performance - Armadous - 01-09-2018

Hi

Thanks for the follow up. I updated unity to the latest version (2018.2.6f1 Personal) and imported ObiFluid into a fresh project and things got a little better. I'm not seeing the same physics clipping behavior and the performance has improved slightly.

https://i.imgur.com/ELoHwmV.gifv

It was tough to get a screenshot from the profiler, it has a tendency to crash unity.

[Image: lOsG0zy.png]

And the unity Profiler. This is the export from the Unity profiler. https://www.dropbox.com/s/is7n0itxhlgjsmn/FluidViscosityProfile.data
[Image: sDibtjc.png]


RE: Poor Sample Performance - josemendez - 01-09-2018

(01-09-2018, 01:39 AM)Armadous Wrote: Hi

Thanks for the follow up. I updated unity to the latest version (2018.2.6f1 Personal) and imported ObiFluid into a fresh project and things got a little better. I'm not seeing the same physics clipping behavior and the performance has improved slightly.

https://i.imgur.com/ELoHwmV.gifv

It was tough to get a screenshot from the profiler, it has a tendency to crash unity.

[Image: lOsG0zy.png]

And the unity Profiler. This is the export from the Unity profiler. https://www.dropbox.com/s/is7n0itxhlgjsmn/FluidViscosityProfile.data
[Image: sDibtjc.png]

Looks like a bad case of death spiralling, since the per-frame times reported by Unity and those reported by the Obi inspector are completely different (Obi reports 33 ms/frame, Unity reports 130 ms/frame) See:
https://www.youtube.com/watch?v=sUVqa-72-Ms

The solution would be to reduce Unity's "max allowed timestep":
https://docs.unity3d.com/Manual/class-TimeManager.html


RE: Poor Sample Performance - Armadous - 01-09-2018

That make a lot sense. It accounts for how the frame rate "slowly" dies now.

I changed the solver to Simulation Order: Late Update, Disabled V-Sync and set my TimeManager as follows.

[Image: WMgv6RZ.png]

With the new setting I believe I'm still seeing the death spiral, albeit much better than the death cliff I saw before.

[Image: s1mcskD.png]

Experimenting with smaller values of Maximum Allowed Timestep does seem to help but not as much I had hoped. At .02, the lowest value it seems to allow I was able to achieve my highest stable frame rate, ~25 frames/sec. Obviously, the fluid behaves very oddly.

[Image: 44N9RTv.png]

A reasonable max step of .1 manages about 15 frames/sec. Is it abnormal to have to change the Fluid Viscosity demo scene to late update to achieve a reasonable frame rate? it seems likely it would have already been set that way if it were actually necessary.


RE: Poor Sample Performance - Evgenius - 05-09-2018

I have the same issue.


RE: Poor Sample Performance - josemendez - 05-09-2018

(01-09-2018, 06:33 PM)Armadous Wrote: That make a lot sense. It accounts for how the frame rate "slowly" dies now.

I changed the solver to Simulation Order: Late Update, Disabled V-Sync and set my TimeManager as follows.

[Image: WMgv6RZ.png]

With the new setting I believe I'm still seeing the death spiral, albeit much better than the death cliff I saw before.

[Image: s1mcskD.png]

Experimenting with smaller values of Maximum Allowed Timestep does seem to help but not as much I had hoped. At .02, the lowest value it seems to allow I was able to achieve my highest stable frame rate, ~25 frames/sec. Obviously, the fluid behaves very oddly.

[Image: 44N9RTv.png]

A reasonable max step of .1 manages about 15 frames/sec. Is it abnormal to have to change the Fluid Viscosity demo scene to late update to achieve a reasonable frame rate? it seems likely it would have already been set that way if it were actually necessary.

Yep, it is not normal to have to use LateUpdate(). We benchmarked the FluidViscosity sample scene in several CPUs, and there are the frame times for them (in milliseconds):

Windows - Intel Xeon E5 (quad core): 8.7 ms/frame (114 fps)
Mac - Intel Core i7 (quad core): 11.2 ms/frame (89 fps)
Mac - Intel Core i5 (dual core): 17 ms/frame (58 fps)

None of them come even close to the +30 ms/frame you're getting. Make sure you try with all profilers disabled (both Obi's and Unity's, even when in non-deep profiling mode). Also try a standalone version of the scene, to rule out editor issues.

AMD's bulldozer-based CPUs are known for really low IPC (instructions per cycle) so they are usually way slower than other CPUs, specially for sequential tasks where the amount of cores is not relevant. However performance should not really suffer that much, since most of Obi is parallelized.


RE: Poor Sample Performance - Evgenius - 06-09-2018

Results

My specs:
Windows 10 Pro 64-bit
AMD FX-8350 8-Core Processor
16 GB RAM
NVIDIA GeForce GTX 1080


RE: Poor Sample Performance - AppFreak - 06-09-2018

Been having some of the same sample performance issues as others.

I'm running an Windows 10 64 bit Intel Xeon E3-1505M 2.8g with 16g of memory MSI Workstation.

I went through the video you put together and tried some of those options. My issue is, I am having a hard time seeing the values you are entering on the video so not sure if I am going in the right direction. Can you please reply with those values?


RE: Poor Sample Performance - Armadous - 09-09-2018

(05-09-2018, 05:05 PM)josemendez Wrote: Yep, it is not normal to have to use LateUpdate(). We benchmarked the FluidViscosity sample scene in several CPUs, and there are the frame times for them (in milliseconds):

Windows - Intel Xeon E5 (quad core): 8.7 ms/frame (114 fps)
Mac - Intel Core i7 (quad core): 11.2 ms/frame (89 fps)
Mac - Intel Core i5 (dual core): 17 ms/frame (58 fps)

None of them come even close to the +30 ms/frame you're getting. Make sure you try with all profilers disabled (both Obi's and Unity's, even when in non-deep profiling mode). Also try a standalone version of the scene, to rule out editor issues.

AMD's bulldozer-based CPUs are known for really low IPC (instructions per cycle) so they are usually way slower than other CPUs, specially for sequential tasks where the amount of cores is not relevant. However performance should not really suffer that much, since most of Obi is parallelized.

Thanks jose, you've been a great help trying to figure out what's going on. A tested a build version on a slightly "newer" AMD computer, an FX-8300 with similar results. It's looking like the FX series isn't capable of running Obi fluid without a lot of compromises. 

I was finally able to achieve something runable by bringing down the simulation quality.
https://i.imgur.com/RlnVZek.gifv