Any major performance change with I/O from JDK 6 that one should be aware of?

Fabrizio Giudici Fabrizio.Giudici at tidalwave.it
Sun May 13 09:35:23 PDT 2012


I've just succesfully ported to OpenJDK 7 a small desktop application that  
was previously running with Apple's JDK 6. The application computes at the  
maximum speed possible the MD5 fingerprints of files in a directory. The  
performance with Apple JDK 6 is about 95-100 MB/sec (which is reasonably  
limited by my disk native I/O speed). The same application with OpenJDK 7  
runs under 7 MB/sec.

Loading is done by means of MappedByteBuffer:

             final @Cleanup RandomAccessFile randomAccessFile = new  
RandomAccessFile(file, "r");
             final MappedByteBuffer byteBuffer =  
randomAccessFile.getChannel().map(READ_ONLY, 0, file.length());
             byteBuffer.load();
             randomAccessFile.close();

 From preliminary measurement, the bottleneck is with I/O. In fact, with  
JDK 6 the application takes most of the CPU (MD5 is computed in parallel  
to I/O), while with OpenJDK 7 the CPU is much lower.

Of course I've tested the same application bits side by side with Apple  
JDK 6 and OpenJDK 7 on the same set of files.


-- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
fabrizio.giudici at tidalwave.it
http://tidalwave.it - http://fabriziogiudici.it


More information about the macosx-port-dev mailing list