guys, if there are any arguments, I can give you Word document with the jar
and test instructions.
I was testing this with one Russian guys on Unix and I was testing on
Windows. We presented this in a discussion at LinkedIn.

The NIO work nicely with big chunks you are about to write; But if you want
to write just one integer to IO, then NIO is just wrong path.
Simply make writes into 256KB buffer and then write it down when buffer
overflows.
You will see differences between native and heap buffer. The typical heap
ByteBuffer uses arrays which needs two machine cycles per read or write.
Reason is that one operation is array range check and then read/write. The
native ByteBuffer is a bit risky, but 2-times faster than heap buffer.

Remember that MappedByteBuffer mapped file system with memory, and JVM
reserved 256MB for native byte buffers. Using DMA the
MappedByteBuffer.write(256KB ByteBuffer) es very fast not because of file
system, but because of DMA memory access.
So what i did, I took file (600MB and 1GB) one and made a copy into another
file. Entire application consumed 8MB (4MB just for JVM) and performed at
400MB/s. I made a test experiment and used different size of Buffers:
8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 KB
and the minimum latency on Windows was with 256KB and most fast.
The measurement was very simple. I used ESET which is bind in kernel, and
"Watch activity" tool gave me this measurement results.
The same test was done on Unix & Sun machine with RAID and the minimum
latency was not such significant - even worse than with Windows.



--
View this message in context: 
http://maven.40175.n5.nabble.com/Preview-release-Plexus-Archiver-multithreaded-Zip-edition-tp5822942p5823154.html
Sent from the Maven Developers mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to