[Samba] slow creating files
a.v.gankov at gmail.com
Wed Feb 8 06:10:11 MST 2012
We tried to migrate from old Windows fileserver (p4, single HDD) to
Samba (FedoraCore15, Samba 3.5.12-72.fc15, ext4 volume, xeon, raid5).
Our pipeline is so, that some special software generates files on that
The typical filesize ~50 mbytes.
On the old hardware, software (win2k3 server) the time of single file
creation was about 10 seconds. On the new configuration it takes 20-25
Copying of large files to\from samba server is ok (more than 80 mbytes\sec).
It was default Samba installation.
The usual tuning doesn't help at all (TCPNODELAY etc...)
Is there any idea for tuning?
Also, I wrote easy test that confused me:
void main(int argc, char *argv)
time_t start, end;
for(i=0; i < fsize/100; i++)
fprintf(to, "\n%7d-%s",i, str);
/ fflush(to); // makes it slow!/
printf("\n \t time_diff = %.2lf", diff);
This was started on Win7 client PC, It creates about 40 mbytes size file
in pointed path.
Comparing timings on our samba share and win2k3 share gives: ~40 seconds
on Samba and on 3-4 seconds win2k3!
That means that fflush cause dramatically slow down of fileshare.
More information about the samba