The Samba-Bugzilla – Bug 8752
dramatically decrease of copying parts of file on Sambe share in some conditions
Last modified: 2012-02-21 12:32:45 UTC
Users noted that the speed of file creation decreased after migrating to Samba (linux FC15 x64,3.5.12-72.fc15). We use specific software that creates files on Samba Share.
I made test software (run on win7, comiled with borland C5.5):
void main(int argc, char *argv)
time_t start, end;
for(i=0; i < fsize/100; i++)
fprintf(to, "\n%7d-%s",i, str);
printf("\n \t time_diff = %.2lf", diff);
The result (in my enviroment):
test.exe \\windows_share\test.txt - 2 seconds
test.exe \\linux_samba_share\test.txt - more than 35 seconds.
The same time, copying large file to\from samba share gives more than 75 mbytes/sec (over gigabyte ethernet)
Please upload a network trace and the output of
strace -ttT -o /tmp/smbd.strace -p <smbd-pid>
while you are doing the test.
Created attachment 7309 [details]
strace -ttT -o /tmp/smbd.strace -p
Without the network trace I can't say for sure, but to me it seems for some reason the file server does not grant an oplock. Can you check that?
Created attachment 7312 [details]
strace and tcpdump from Samba
Was made during running test program on Win7 x64 client:
You might try upgrading to Samba 3.6.3 and the setting "max protocol = smb2"
(In reply to comment #5)
> You might try upgrading to Samba 3.6.3 and the setting "max protocol = smb2"
I got advice to try
strict allocate = yes option.
For the first view, it does the required speed improvement. But I still have idea to try Samba 3.6.3
Ok, so I can close this as "strict allocate = yes" fixes it ?
I am not surprised. When creating and allocating files using extents on an ext4 this would have that effect.
Closing at reporter's request by private mail