PhysX performance in Omniverse

PhysX seems to run slowly for me in Omniverse. The Warehouse demo runs at about 3000-4000 ms per frame while the simulation is running, and 60 FPS with no simulation running. Even small physics demos are slow. With Warehouse, when I start the simulation, GPU usage goes down from 20% to 2%. CPU usage spikes to near 100 % every 5 seconds or so, but otherwise stays near what it was before simulation. I’ve cleared the cache with no effect. The Kapla demo from the PhysX SDK runs much faster, around 100 FPS.

Presumably, it’s maybe trying to run on the CPU instead of the GPU? What can I do to fix it?

Environment:
Windows 10 19044.1889
RTX 3090 24 GB, 31.0.15.1694
AMD Ryzen Threadripper PRO 3975WX 32 Cores
128 GB Memory
SSD with 400 GB free
Omniverse Create 2022.1.5

Processing: kit_20220829_133626.log…

Hello @cegbert! I will report this to the dev team. Did you try running this on the newest version of Create 2022.2.0? I am curious if there are improvements with the performance.

Hi,
you tried to run the demo in Create right? By default the simulation output goes to USD and the writes are very slow.
In order to get a speedup for rigid body simulation one can speedup the writes for rendering by enabling omni.physx.flatcache extension.
Can you please try that if that helps with the perf? By default the simulation should run on GPU, if you have a physicsScene in that stage you can check if the GPU enabled is on or off.

The flatcache extension fixed it. Thanks!

Now I’m curious what it does, and what would be the benefit of turning it off?

So when this extension is enabled, the output of the simulation for rigid bodies and softbodies does not get written back to USD but instead its written into our runtime solution - Flatcache/Fabric.
Now through this data system we are able to push the data more directly to the rendering.

Unfortunately we dont yet support everything though this data pipeline. So some bits like point instancers, particles dont work through this pipeline. There are also some issues with the scene graph instancing.
Furthermore the data are not really visible to you, you dont see the changes in the UI nor from accessing the USD data. So you wont be able for example to inspect or modify the data from python.
If you are interested only in the simulation and dont interact with the simulation, flatcache should work in most cases. But because its not really fully supported yet, its not enabled by default.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.