wy96f commented on issue #2844: ARTEMIS-1811 NIO Seq File should use RandomAccessFile with heap buffers URL: https://github.com/apache/activemq-artemis/pull/2844#issuecomment-534834600 > The overhead of file reading using `RandomAccessFile` and `byte[]` vs `FileChannel` and direct `ByteBuffer` is variable, but using the benchmark I've used on Netty [here](https://github.com/netty/netty/pull/9591#issuecomment-534002621) has given this result: > > ``` > Benchmark (chunkSize) (fileName) (fileSize) (ioSize) Mode Cnt Score Error Units > ChunkedFileBenchmark.readFullyFile 32768 /tmp/raf.tmp 10485760 32768 avgt 4 2153.527 ± 715.641 us/op > ChunkedFileBenchmark.readFullyFileWithNio 32768 /tmp/raf.tmp 10485760 32768 avgt 4 1775.999 ± 831.715 us/op > ``` > > That means about a 25% perf difference while using super-fast disks and I assume to be the same on write side. Do you mean 25% perf reduction using `RandomAccessFile` and `byte[]` compared to `FileChannel` and direct `ByteBuffer` ?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services