Messages in this thread | | | Date | Mon, 26 May 2008 10:57:54 +0200 | From | "Francis Moreau" <> | Subject | Re: question about splice performance |
| |
Hello,
On Sun, May 25, 2008 at 10:47 PM, Jeff Garzik <jeff@garzik.org> wrote: > > If you drop caches you are not measuring splice speed. > > Use ramfs for your tests (guarantees data is in cache) instead. >
So it seems that the gain when using splice to copy a file into another file is very limited. Maybe that's the reason why cp is still using read/write...
Also splice-cp uses 2 calls to splice syscall in a loop. So it end up doing a lot of syscalls. Maybe using sendfile instead of is better.
Also2, since splice is a generalized pipe, it might be better to create to processes, one writing to the pipe and the other one reading to have better workflow.
That said I also see some use cases where splice could be more useful, specially when one of the file descriptor is actually a device: one the write side of the pipes a device could write some data while on the other side of the pipe a process can empty the pipe by writing the data to a file.
Are there any plans to improve splice interface to be used by drivers ?
Thanks. -- Francis
| |