Online Books:
java.net on MarkMail:
Search |
||
Benchmarks and (less) surprises (?)Posted by fabriziogiudici on April 26, 2008 at 5:46 PM PDT
As a follow-up of my previous
post, I've cleaned up my benchmark code (the log files have
been reduced in size from 40MB to 800kB, some bugs have been fixed and
the UUID strategy has been chosen for generating primary keys in the
database, thus reducing contention chances with multiple threads).
At this point the impact of logging should be neglectable, thus the comparison makes more sense (if you haven't read my previous post, the test reads metadata from about 150+ photos and insert them into a Derby database, with both single- and multi-thread approaches; the test is run with different software combinations but always on the same hardware, my MacBook Pro first generation, 2GHz, 2GB RAM; numbers are seconds per photo, the lower the better). Workers Linux Ubuntu 8.04 Windows XP Mac OS X 10.5In this round of tests I introduced a double benchmarking for every platform, by using both the "Client" JIT (java -client) and the "Server" one (java -server). Here are some points:
The instructions to reproduce this are in my previous post, this time you must use -r 5368 for checking out the blueMarine code. In any case, at least with Windows and Linux I'm reaching my performance goal, which is 0.20 seconds per photo. Indeed, considering some known issues of my code, I should be able to make better than it. *** Edited to add: To make things easier to read, I'm adding a table with normalized values. The percentages indicates how slow a test runs (e.g. 100% means that it runs at half speed). Best performers are marked in green, worse performes in red; also a specific comparison among Java 5 only VMs is given. In each column pair, the "Client" JIT figure is at the left side, the "Server" JIT figure at the right.
![]() »
Comments
Comments are listed in date ascending order (oldest first)
Submitted by fabriziogiudici on Tue, 2008-04-29 04:22.
This is weird :-) The point is that it's not Apple's JDK to select -server, indeed it doesn't. It's Sun's JDK on my Ubuntu platform that selects -server! Did you run your test on Windows or Linux?
Submitted by fabriziogiudici on Tue, 2008-04-29 23:18.
Absolutely no virtualization - I never run performance tests in virtualization. I've natively rebooted in each of the three operating systems for running the test.
Submitted by opinali on Mon, 2008-04-28 11:27.
On the ergonomics (server class detection): this link provides updated information for Sun JDK 6, but the basic rule remais the same (2 CPUs and 2Gb RAM). Notice though that it's "two CPUs", and I wouldn't expect that multi-core CPUs would be counted just like SMP systems. This would suck because any recent customer PC (even laptops) is multi-core, and 2Gb of RAM is also standard today (those using the latest OS's from Microsoft or Apple certainly need it...).
I just checked this in two machines, one desktop and one laptop, both having Core2 Duo CPUs and 2Gb of RAM. (Both machines have dedicated graphics cards, so there's no missing RAM due to integrated graphics.) I tested JDK 1.5.0_15 and 1.6.0_10-beta-b21, both select HotSpot Client as default.
So, if your MacBook is just dual-core (but not SMP) but the JVM is picking Server by default, perhaps Apple's MRJ is less smart in the ergonomics... since the MRJ is provided by Apple and not Sun, you can't trust too much on documentation from Sun JDK; ergonomics is one of these things that are completely implementation-specific, so if something works exactly identical on JVMs of other providers - even those who license Sun's sources and build on top of it like IBM, BEA and Apple - you're just lucky. For IBM JDK, there is a Diagnostics Guide that details everything about JVM configuration, tuning and troubleshooting. I guess similar docs should exist for the other providers.
|
||
|
|