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

Kirk Pepperdine kirk at kodewerk.com
Sun May 13 10:15:49 PDT 2012


No idea about the differences in I/O performance. I do know that 7 was abstracted further away from OSX.. so there might be something there. Certainly a calmer CPU is an indication of a problem with I/O.

Kirk

On 2012-05-13, at 6:35 PM, Fabrizio Giudici wrote:

> 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