Files.copy does userspace copies but FileChannel uses sendfile
Alan Bateman
Alan.Bateman at oracle.com
Wed Oct 12 05:41:53 UTC 2016
On 12/10/2016 00:30, Max Kanat-Alexander wrote:
> :
>
> Should these be merged? Or should the Java-side implementation of
> Files.copy be changed to use FileChannel underneath?
>
>
It's been a copy while the performance was checked but the last time
then sendfile was great for file <--> socket but we weren't see any
benefit for file <--> file. Kernels improve and there are many different
file systems so it probably should be remeasured. If there are benefits
to the FileSystemProvider to use sendfile then it could do that.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20161012/fa133a13/attachment.html>
More information about the nio-dev
mailing list