Server-side copy with sendfile system call

David Disseldorp ddiss at suse.de
Thu May 22 07:27:14 MDT 2014


On Thu, 22 May 2014 18:37:34 +0800, Teng-Feng Yang wrote:

> I already reimplement the vfswrap_copy_chunk_send with sendfile system call.
> However, I have noticed that the throughput shown in my Windows Server
> 2012 machine keeps bouncing up and down through the whole copy
> process.
> The peak performance is around 140MB/s on a single 4TB harddisk, and
> then it will drop down to 0MB/s for a couple of seconds before it
> rises back to 140MB/s again.
> This repeat pattern results in an overall worse performance than the
> origin read-then-write version of copy_chunk function.
> 
> I don't know if I do anything wrong. The following is my version of
> copy_chunk_send using sendfile().
> Any comment would be highly appreciated.

Does the modified server pass the smb2.ioctl smbtorture tests? I doubt
it without the src=dest read/write fallback.
If it does pass the tests, and you're still seeing this strange
behaviour, then please take a tcpdump across the copy, and send it to me
off list.
The patch looks okay, but is missing the relevant sendfile support
checks and src=dest fallback as mentioned.

Cheers, David


More information about the samba-technical mailing list