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): #include "stdio.h" #include "stdlib.h" #include "time.h" void main(int argc, char *argv[]) { int fsize=40000000; int i=0; FILE *to; char str[]="0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"; time_t start, end; double diff; time(&start); to=fopen(argv[1], "w+"); for(i=0; i < fsize/100; i++) { fprintf(to, "\n%7d-%s",i, str); fflush(to); } fclose(to); time(&end); diff=difftime(end,start); 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: test.exe y:\temp\test.txt
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. Jeremy.
Closing at reporter's request by private mail