Sign in with
Sign up | Sign in

Nvidia PhysX Software is Ancient, Slow for CPUs

By - Source: Tom's Hardware US | B 56 comments

PhysX for CPUs is built on x87. Not the best choice on modern day CPUs, it seems.

Nvidia's acquisition of Ageia in 2008 was a strategic move to boost the marketability of its GPU offerings. With the discontinuation of the dedicated PhyX boards, the acceleration moved to the GeForce GPU as a differentiation factor that set it apart from AMD's ATI cards.

If a PhysX game detected the presence of an Nvidia GPU, it would move the hardware physics to the video card. Without an Nvidia board, the physics would hit the CPU, which in all cases is slower than what a GPU can do.

It's expected that Nvidia would like to do everything it can to distance itself from the CPU and the GPUs of its competitors, but closer looks at the PhysX software implementation have shown that there could be some shadiness going on.

An excellent investigation by David Kanter at Real World Technologies found that Nvidia's PhysX software implementation for use by CPUs still uses x87 code, which has been deprecated by Intel in 2005 and now has been fully replaced by SSE. Intel supported SSE since 2000, and AMD implemented it in 2003.

The x87 code is slow, ugly, and remains supported on today's modern CPU solely for legacy reasons. In short, there is no technical reason for Nvidia to continue running PhysX on CPUs using such terrible software when moving to SSE would speed things considerably – unless that would make the GeForce GPGPU look less mighty compared to the CPU.

Ars Technica's Jon Stokes confronted Nvidia about deficient PhysX code and we are just as surprised as he was that Mike Skolones, product manager for PhysX, said "It's a creaky old codebase, there's no denying it."

Nvidia defends its position that much of the optimization is up to the developer, and when a game is being ported from console to PC, most of the time the PC's CPU will already run the physics better than the console counterpart. The 'already-better' performance from the port could lead developers to leave the code as-is, without pursuing further optimizations.

"It's fair to say we've got more room to improve on the CPU. But it's not fair to say, in the words of that article, that we're intentionally hobbling the CPU," Skolones said. "The game content runs better on a PC than it does on a console, and that has been good enough."

Another problem is that the current PhysX 2.7 codebase is very old; so old, in fact, that it goes back to before 2005, when x87 was deprecated. Skolones said that Nvidia is working on version 3.0 which should bring things up to date a little bit, though we don't doubt that the GPGPU functions will still be faster.

This isn't the first time that we've heard that Nvidia's PhysX software is less than well-optimized. AMD accused Nvidia of disabling multi-core support in CPU PhysX earlier this year.

Display 56 Comments.
This thread is closed for comments
Top Comments
  • 28 Hide
    Computerrock1 , July 12, 2010 12:13 PM
    As much as I think Nvidia is a great marketing strategist, I think they dropped the ball on Physx...
  • 23 Hide
    dan117 , July 12, 2010 12:54 PM

    DirectCompute / OpenCL >>> PhysX
  • 15 Hide
    Syndil , July 12, 2010 1:30 PM
    PhysX has always been shady. This should come as no surprise to anyone. I'm not sure why it's still around. Well, other than the fact that Nvidia wants it to be around.
    But with multi-core CPUs the norm now, why would I want to dedicate part of my graphics computing power for physics? Rhetorical question; I wouldn't. I'd rather have the game written to be optimized for multiple cores, and perhaps dedicate one core to physics, if it would help. Seems silly to have CPU cores idling while the GPU does double duty.
Other Comments
  • 28 Hide
    Computerrock1 , July 12, 2010 12:13 PM
    As much as I think Nvidia is a great marketing strategist, I think they dropped the ball on Physx...
  • 4 Hide
    mauller07 , July 12, 2010 12:16 PM
    This is why Agners CPU blog is a good read.

    seriously need better standardization and a massive spring clean with the x86 code base and all extensions since, it could bring a lot of performance improvements with very little expenditure on cpu resources much like optimizing bad code.
  • 10 Hide
    kartu , July 12, 2010 12:33 PM
    Quote:
    But it's not fair to say, in the words of that article, that we're intentionally hobbling the CPU

    Right. You are soo motivated to make it work well even without nVidia's mini-ovens.
  • 7 Hide
    abcdeasdfasdf , July 12, 2010 12:36 PM
    GPU scene has some shady part; no doubt about it, even hardware Ageia cards back then is questionable.
  • 12 Hide
    waffle911 , July 12, 2010 12:42 PM
    Why so lazy, Nvidia? "Better than it was" and "good enough" are not real excuses for neglecting a key technology you market to developers.

    I really wouldn't be surprised if AMD eventually brought about and advocated the development of a new "Open-PL" physics standard or something.
  • 23 Hide
    dan117 , July 12, 2010 12:54 PM

    DirectCompute / OpenCL >>> PhysX
  • -5 Hide
    kelemvor4 , July 12, 2010 1:19 PM
    dan117DirectCompute / OpenCL >>> PhysX

    DirectCompute/OpenCL/CUDA != PhysX. They serve different purposes.

    Silly to say nvidia is deliberately hobbling physx on the cpu, though; given that ALL the physx code is old (by the author's admission) it's just old code. I'm an nvidia fan but the truth is that physx is so poorly adopted among game developers it wouldn't bother me in the least to just see it go away.
  • 2 Hide
    mitch074 , July 12, 2010 1:20 PM
    There is one thing to keep in mind, though: MMX is useless for this kind of computation, and SSE was absent from:
    - Pentium Pro
    - Pentium II
    - early K7: Athlon (up to 1200 MHz) and Duron (up to 950 MHz)
    So, at the time the software-only implementation of PhysX was written (around 2005, I'd say), there were still some SSE-less machines around.

    Of course, Nvidia has no excuse about not making an SSE-optimized build until now, will x87 fallback.
  • 2 Hide
    rembo666 , July 12, 2010 1:21 PM
    To be fair, it takes almost as much effort to make something run with SSE instructions as it does with GPU. "Deprecated" is a strong word. x87 instructions are still very widely used and are much more efficient today than they were with the old 8087 co-processor. The only time programmers use SIMD (Single-Instruction-Multiple-Data) instructions is when they need to speed up processing on a massive amount of floating point data.

    I do agree with your premise, but not the language you use. Optimizing your code to run the SSE instructions can give you about 3x to 4x speedup. However, it takes effort. NVIDIA would rather spend the resources on the parts of PhysX that sell their GPUs than to maintain the CPU compatibility code.

    This strategy may backfire, since they still make money by licensing the PhysX technology to game developers. If they cripple their physics engine for non-NVIDIA setups, they will lose revenue and market share to Havok. Developers want their games to work on as many configurations as possible. If they can't have what they want from NVIDIA, they will go to someone who will provide it.
  • 15 Hide
    Syndil , July 12, 2010 1:30 PM
    PhysX has always been shady. This should come as no surprise to anyone. I'm not sure why it's still around. Well, other than the fact that Nvidia wants it to be around.
    But with multi-core CPUs the norm now, why would I want to dedicate part of my graphics computing power for physics? Rhetorical question; I wouldn't. I'd rather have the game written to be optimized for multiple cores, and perhaps dedicate one core to physics, if it would help. Seems silly to have CPU cores idling while the GPU does double duty.
  • 6 Hide
    Anonymous , July 12, 2010 2:09 PM
    VHS-Betamax format wars,HD/DVD or BD technology all over again.

    When there is one open standard it will become mainstream! Until then it is still sideline to the main game!

    Nvidia could do better here by working to get their PhysX as main standard used by correct code development and open licensing with incentive!

    I see PhysX going away in the long run if they continue to deal with it so close like they are now being replaced with a more open implementation.

  • -8 Hide
    Regulas , July 12, 2010 2:34 PM
    "discontinuation of the dedicated PhyX" That was a bad move for PC gamers.
  • 10 Hide
    dan117 , July 12, 2010 2:46 PM
    kelemvor4DirectCompute/OpenCL/CUDA != PhysX. They serve different purposes.

    I was talking about their usefulness in game engines for physics simulations.
    And DirectCompute/OpenCL/CUDA can do everything PhysX can, but not the other way around, that's why they are better than PhysX.
    Also, CUDA is not as good as OpenCL and DirectCompute for games because they are excusive to nVidia cards which don't have the same performance/price ratio as ATI cards.
  • 6 Hide
    fausto , July 12, 2010 3:30 PM
    i wonder is enabling proper physx on cpu to use all cores and use SSE code will render the load on the physx cable video card lower and/or enhance cpu's to the point that the physx card is not required.
  • 1 Hide
    jednx01 , July 12, 2010 3:34 PM
    In my experience, I don't like physx at all. I have had much smoother gameplay experiences without it, and I don't feel like the physx are that much worse....
  • 3 Hide
    redgarl , July 12, 2010 3:40 PM
    Physx.... or Havoc...

    Havoc for me.
  • 0 Hide
    bastyn99 , July 12, 2010 3:48 PM
    waffle911Why so lazy, Nvidia? "Better than it was" and "good enough" are not real excuses for neglecting a key technology you market to developers.I really wouldn't be surprised if AMD eventually brought about and advocated the development of a new "Open-PL" physics standard or something.

    That Id like, but if AMD is gonna be as slow as in the past, and with the HD 6xxx series marked for last half of 2011, I dont think its gonna happen anytime soon
  • 4 Hide
    kikireeki , July 12, 2010 4:25 PM
    This is what happens when you secure your position in the market.
Display more comments