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 12:34:38 PDT 2012
On Sun, 13 May 2012 20:22:20 +0200, Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> The above is essentially open + mmap + madvise and there hasn't been
> anything of significant between 6 and 7 that comes to mind, unless of
> course Apple's jdk6 specifies different advice that improves this case.
> The only thing that comes to mind is the security provider, maybe there
> is a different MD5 implementation that is being used.
I think MD5 would lead to a higher CPU usage. In any case, I'm isolating a
test case only focused on I/O. I'm creating 20 files whose size ranges
from 10 to 100 MB and run the above code on it. Files are created from
scratch at each run to avoid disk caching issues. Performance measures are:
* for Apple JDK 6: speed 78-88 MB/sec
* for OpenJDK 7: speed 518-716 MB/sec
The latter figure is clearly a fake one: in fact the system monitor sees
no disk activity. Is it possible that the MapByteBuffer.load() method
changed behaviour, postponing the actual data loading? It would be
compatible with the specs:
****
Loads this buffer's content into physical memory.
This method makes a best effort to ensure that, when it returns, this
buffer's content is resident in physical memory. Invoking this method may
cause some number of page faults and I/O operations to occur.
****
Perhaps JDK 6 loads everything with the single load() call, which is more
efficient, while OpenJDK 7 postpones it? And perhaps it does it
inefficiently due to a scattered data access by means of the MD5 library?
(I knew a lot about crypto algorithms time ago, but now I've forgotten all
the details).
--
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