[clug] does splice work?

oferh oferh at marvell.com
Fri Jun 18 00:22:59 MDT 2010


Hi,

I am trying to enable recvfile (splice) on samba 3.4.3 running Linux
2.6.31.8 to get better write performance.
I am able to copy up to 81M part of a file to the samba share and then the
copy stops.
Using min receivefile size = 128k in smb.conf

I enabled log level 10 to see that splice is being used (sys_recvfile in
log) and also stracing shows the system call invoked.

When copying a file to the share I see lots of copy using splice done:
gettimeofday({1276852655, 84766}, NULL) = 0
gettimeofday({1276852655, 84918}, NULL) = 0
select(27, [6 8 26], [], NULL, {5, 408029}) = 1 (in [26], left {5, 408019})
gettimeofday({1276852655, 85238}, NULL) = 0
read(26, "\0\1\0@", 4)                  = 4
read(26,
"\377SMB/\0\0\0\0\30\7\350\0\0\0\0\0\0\0\0\0\0\0\0\1\0\377\376d\0\213\231"...,
64) = 64
SYS_340(0x1a, 0, 0x1f, 0, 0x4000)       = 16384
SYS_340(0x1e, 0, 0x1d, 0xbee0a438, 0x4000) = 16384
SYS_340(0x1a, 0, 0x1f, 0, 0x4000)       = 16384
SYS_340(0x1e, 0, 0x1d, 0xbee0a438, 0x4000) = 16384
SYS_340(0x1a, 0, 0x1f, 0, 0x4000)       = 16384
SYS_340(0x1e, 0, 0x1d, 0xbee0a438, 0x4000) = 16384
SYS_340(0x1a, 0, 0x1f, 0, 0x4000)       = 16384
SYS_340(0x1e, 0, 0x1d, 0xbee0a438, 0x4000) = 16384
writev(26,
[{"\0\0\0/\377SMB/\0\0\0\0\210\1\310\0\0\0\0\0\0\0\0\0\0\0\0\1\0\377\376"...,
51}], 1) = 51

And then after some time it copied part of the file I see:
SYS_340(0x1a, 0, 0x1f, 0, 0x4000)       = 0

It looks like splice is returning zero to syscall and samba does not treat
this return call and continues the copy loop.

Has anyone succeeded making splice work on large files on recent kernels ?
-- 
View this message in context: http://old.nabble.com/does-splice-work--tp28922375p28922375.html
Sent from the Samba - linux mailing list archive at Nabble.com.



More information about the linux mailing list