Why is my java application faster on an AMD proces

2019-08-13 20:45发布

问题:

I made the observation that my java application is running much faster when executed on an AMD processor in contrast to an Intel CPU.

For example my JBoss starts in about 30 seconds on a 3 GHz AMD processor and needs about 60 seconds on a 3 GHz Intel processor with identical disc, RAM and OS?

Has anyone else made this observation? Why is this so?

回答1:

It depends on the CPU generation as well - clock speed is not everything.

If you set up e.g. an Intel Pentium 4 and an AMD Phenom with the same clock speed, you'll see a large difference in favour of the Phenom.


Update: If you're really curious, use a profiler and post the results.



回答2:

Other considerations:

  • Size of processor on-board cache
  • Bus speed of your motherboard
  • Cache size of your hard drive
  • Hard drive RPM and read speed

Bottom line: Unless your configurations are identical besides the chips, and you are trying to asses the performance of a particular technology, you're really comparing apples to oranges.



回答3:

Are they both running the same architecture? Or is the AMD running a 64-bit OS?

Remember that startup time isn't everything; a 60s startup time probably isn't that bad if the application runs as fast AFTER it's started up.



回答4:

I've seen 64-bit JDK work much faster than 32-bit one on the same processor. So maybe that's the case.

EDIT: http://java.sun.com/docs/hotspot/HotSpotFAQ.html#64bit_performance. Sorry, I guess I'm wrong.