[Samba] Bad performance samba and Windows XP
drzik at coop-voz.sk
Fri Apr 28 12:40:03 GMT 2006
I observed following behaviour. When I'm writing big (200MB+)
files to samba share from Windows XP then writing speed is slow.
Reading of these files (written from Windows XP) is very slow too.
I found that it is caused by framgentation of this file [observed by using debuge2fs].
I tried to figure out what causes this framemtation and it seems that Windows XP
is trying to do some optimalizations that are too bad for perfomance.
It is trying to preallocate space for this file by writing forward in 32kb
blocks where value 0 (zero) is written to the first byte of this 32kb block (
in my case it is ext3 filesystem with 4kb inodes so it is 8 inodes).
This wastes 1 inode separated by 7 unused inodes between another used inode.
Windows XP starts to write real data when cca 20MB of space is prealocated and it causes that
this data is not written exactly to that prealloced space. It is prealocating this space
parallely with writting of data 20MB or so ahead and it causes fragmentation of file data.
This peallocation causes that 7 inodes of one part of file are followed by one inode of another
part of file. I know that it can be eliminated by dissabling sparse files but that can cause
other problems too.
Can you help me please to find way how to improve performance without dissabling sparse files?
P.S. Sorry for my poor english ;)
More information about the samba