RFR: 6980847: (fs) Files.copy needs to be tuned [v5]
Brian Burkhalter
bpb at openjdk.org
Thu Jun 16 23:38:53 UTC 2022
On Thu, 16 Jun 2022 23:36:34 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Modify `UnixCopyFile.copyFile()` to set the transfer size to the least common multiple of the source and destination file block sizes if the block sizes are not equal. Modify `WindowsFileCopy.copy()` to set `COPY_FILE_NO_BUFFERING` in the flags passed to `CopyFileEx()` if the size of the transfer is greater than a threshold.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 6980847: Use temporary direct buffer for user-space copy
Benchmark numbers for temporary direct buffers (commit c30a6f0be3f45e30c32fbaf7cbd48ea96ca0e450):
Benchmark (length) Mode Cnt Score Error Units
CopyFile.copy 10000 thrpt 10 31927.639 ± 349.679 ops/s
CopyFile.copy 100000 thrpt 10 12155.232 ± 118.164 ops/s
CopyFile.copy 1000000 thrpt 10 1680.935 ± 36.228 ops/s
CopyFile.copy 10000000 thrpt 10 119.173 ± 1.992 ops/s
These are similar to the measurement of the previous version (commit 0a77bd26e2542f98b42bb65b716738e75f6979bc) but have neither stack nor malloc'ed memory.
-------------
PR: https://git.openjdk.org/jdk/pull/9161
More information about the nio-dev
mailing list