Core i7 with all cores busy at 100% with PhysX FluidMark
The new version of FluidMark comes with a cool feature: the multi-core CPU support.
What does it really mean ? Simply that you can run the whole PhysX fluid simulation on the CPU in a 100% software mode AND the fluid simulation is spread over all CPU cores in order to speed up computations.
I added two modes when multi-core PhysX is used:
1 – Synchronous mode (default)
2 – Asynchronous mode (Async mode)
Both modes are controlled by the Async mode checkbox:
In both modes, and when Force PhysX CPU is checked, one or several threads are used for the fluid simulation. The number of threads is actually drived by the number of emitters.
In synchronous mode, all PhysX threads are synchronized with the rendering thread. That’s why the number of FPS (frames per second – rendering) is the same than the number of SPS (simulations per second – physics). You discover the term SPS for the first time ? Normal, I created it during the dev of FluidMark to differentiate the speed of graphics rendering to the speed of physics simulation. In synchronous mode you’ll never get a 100% CPU usage because the synchronization introduces a kind of wait state every frame.
On a 4-core CPU with 3 emitters, you should get a CPU usage of around 80%. I get a 84% CPU usage on my Core i7 with 120’000 particles and 7 emitters:
In asynchronous mode, the PhysX threads are decoupled from the rendering thread and there is no longer synchronization between graphics and physics threads. This mode allows a 100% CPU usage if the amount of particles in the fluids is enough large. In my case, I have the 8 cores of my Core i7 busy at 100% with 120’000 particles:
In synchronous mode, even if you select more emitters than the number of CPU cores-1, the fluid simulation will run without problem (if the number of particle is large, it simulation will be slow). On the other hand, in asynchronous mode, you’ll have some troubles if the number of emitters exceeds the number of COU cores -1.
Currently I don’t know if the problem comes from my multithreading code or from Windows. When a lrage number of particles is set, PhysX threads are quite heavy and I read somewhere that Windows has some problems with really intensive threads especially when the number of intensive threads is greater than the number of CPU cores…
PHYSX FLUIDMARK 1 2 0 BENCHMARK WITH AND WITHOUT MULTI THREADED CPU PHYSX 1920X1080 ATI :