Online Books:
java.net on MarkMail:
Search |
|||||||||||||||||||||||||||||||||||||
Benchmarks and surprisesPosted by fabriziogiudici on April 14, 2008 at 2:45 PM PDT
I'm posting some results from my latest benchmarks on the Metadata
facility of blueMarine - take them with half a pinch of salt, since
I've checked them but not double-checked, sorry but I have just a
little time in these days. They gave some little surprise to me.
In short, the test takes about 160 photos and imports all the metadata into a Derby database (details for reproducing it below). In total, 10000+ records are imported. The tests run with a classic Master / Worker pool with 1, 2, 3 and 4 workers on a MacBook Pro 2GHz, 2GB RAM in all the combinations of (Java 5, Java 6) x (Mac OS X 10.5, Linux Ubuntu 8.04, Windows XP) - note that I've used Soylatte on Java 6 since I don't have a 64 bit computer and can't run the Java 6 previews from Apple (thanks, Apple). The benchmark figure is the number of seconds needed to import a photo, so the lower the number, the better.
Before commenting, keep in mind the following points:
To reproduce:
»
Comments
Comments are listed in date ascending order (oldest first)
Submitted by fabriziogiudici on Tue, 2008-04-15 12:21.
Thanks for the feedback. Indeed, what is frustrating with this kind of problems is that, unless you work for a corporate with a large laboratory, this is stuff that is pretty difficult to track down. I mean, I'm the first to be aware that running a few tests and comparing a few numbers is not enough unless you understand from where those number comes and, above all, you have a larger basis for experiments. Unfortunately, as a freelance, I have only a handful of computers to try with.
Coming back to your question, I've just tried Hardy Heron with the default EXT3 installation. I don't have the configuration parameters at hand, since I have to reboot to access them, I'll try to post them later.
Submitted by predo on Wed, 2008-04-16 13:15.
Both ext3 and and hfs can do journaling, and both Linux and OS-X seem to be configured by default to use it. http://en.wikipedia.org/wiki/Ext3 and http://en.wikipedia.org/wiki/HFS_Plus are some starting pointers.
However, the level of journaling seems to vary, making the comparison difficult. As to the approach for tuning performance, I would consider both theoretical issues of design and experimentation. The information on the web is vague and at times misleading. But it should be possible to do build some tuning skills in house... having enough time and configurations available :-)
Submitted by mbien on Thu, 2008-04-17 06:00.
>The tests still run with logs at maximum power (each run produces 40MB of files), so the computation is more disk intensive than it should
40MB is a lot of text ;)
performance testes with logging enabled often give different results compared to execution under real conditions. Don't underestimate the impact of the synchronization costs (each log() or System.out.println() is synchronized). Print-out to console performance is also system dependent (and can be slow).
Submitted by fabriziogiudici on Thu, 2008-04-17 06:16.
Hi Michael :-) Yes, I know, and that's why I'm quite optimistic about the final figure. But what I found amazing is that the logging code is of course the same, and the performance is so different in the three operating systems on the same hardware - in other words, I'm surprised by the huge difference in numbers rather than absolute numbers. In any case, in the weekend I'll re-run it with no logs.
Submitted by fabriziogiudici on Sat, 2008-04-26 17:47.
I've posted a folllow-up here: http://weblogs.java.net/blog/fabriziogiudici/archive/2008/04/benchmarks_...
|
|||||||||||||||||||||||||||||||||||||
|
|
My experience with Java 6 vs Java 5 regarding performance is the same. The performance improvement on Linux is definitely a winner: plain code runs faster and if we take GUI elements into account (fonts, trees, tables and textareas) it's also smoother and more accurate.
Regarding the difference between OS's, I agree the file system requires some investigations. My experience with EXT3 on Linux are terrible with DB applications. There's a high-priority writer process that just makes the system hang for seconds. Like Java's GC, but much worse :-)
"Downgrading" to EXT2 and letting the DB take care of journaling was the solution for me.
Having said this, you are in the opposite situation: Linux performs better than the other OS's. What file system do you use? Block-size? Anyway, interesting...
I can only reference an old benchmark of Linux vs BSD-derived OS's on basic memory, IPC and socket operations:
http://bulk.fefe.de/scalability/
Linux always had performance as a priority. BSD... it depends. OS X... I don't know.