[Samba] vfs_fruit causes delay in listing directories for Windows clients

Stephan Roth stroth at ee.ethz.ch
Wed Dec 12 14:35:00 UTC 2018


Listing directories with many files (10000+) from a Windows client is 
nociceably slower when vfs_fruit is enabled on the samba server compared 
to the same setup without vfs_fruit.

On my setup it's roughly 2.5 times slower. To me it looks like this is 
caused by the getxattr call which is only present with vfs_fruit 
activated and introduces an additional delay of ~ 0.00033 s per listed file.

strace -T reveals the following with vfs_fruit activated:

newfstatat(35, "03915", {st_mode=S_IFREG|0660, st_size=1265, ...}, 
AT_SYMLINK_NOFOLLOW) = 0 <0.000243>
fcntl(20, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=8368, 
l_len=1}) = 0 <0.000010>
fcntl(20, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=8368, 
l_len=1}) = 0 <0.000009>
stat("stroth/testfiles_10000-50000/10000/03915", {st_mode=S_IFREG|0660, 
st_size=1265, ...}) = 0 <0.000312>
getxattr("stroth/testfiles_10000-50000/10000/03915", 
"user.org.netatalk.Metadata", 0x55803d5c9a90, 402) = -1 ENODATA (No data 
available) <0.000348>
listxattr("testfiles_10000-50000/10000/03915", "", 1024) = 0 <0.000345>

a trace of the same directory listing with vfs_fruit disabled is faster 
and doesn't show the getxattr call:

newfstatat(36, "03239", {st_mode=S_IFREG|0660, st_size=303, ...}, 
AT_SYMLINK_NOFOLLOW) = 0 <0.000252>
fcntl(20, F_SETLKW, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=19600, 
l_len=1}) = 0 <0.000008>
fcntl(20, F_SETLKW, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=19600, 
l_len=1}) = 0 <0.000007>
stat("stroth/testfiles_10000-50000/10000/03239", {st_mode=S_IFREG|0660, 
st_size=303, ...}) = 0 <0.000419>
listxattr("testfiles_10000-50000/10000/03239", "", 1024) = 0 <0.000355>


My goal with activating vfs_fruit was to speed up directory listings for 
Mac clients, which works. Can the accompanying slowdown for Windows 
clients be avoided?

Thank you for any insights,
Stephan




More information about the samba mailing list