Re: Ext3 vs NTFS performance

Anton Altaparmakov
2007-05-04T08:15:24Z

On 3 May 2007, at 23:40, Bernd Eckenfels wrote:
> In article <20070503211450.GA3869@nifty> you wrote:
>> For this particular case, Ted is probably right and the only place
>> we'll ever see this insane poor man's pre-allocate pattern is from
>> the
>> Windows CIFS client, in which case fixing this in Samba makes sense -
>> although I'm a bit horrified by the idea of writing 128K of zeroes to
>> pre-allocate... oh well, it's temporary, and what we care about here
>> is the read performance, more than the write performance.
>
> What about an ioctl or advice to avoid holes? Which could be issued by
> samba? Is that related to SetFileValidData and SetEndOfFile win32
> functions?
> What is the windows client calling, and what command is transmitted
> by smb?

Nothing to do with win32 functions. Windows does NOT create sparse
files therefore it never can have an issue like ext3 does in this
scenario. Windows will cause nice allocations to happen because of
this and the 1-byte writes are perfectly sensible in this regard.
(Although a little odd as Windows has a proper API for doing
preallocation so I don't get why it is not using that instead...)

As far as I know the only time Windows will create sparse files is if
you specifically mark a file as sparse using the FSCTL_SET_SPARSE
ioctl and then create a sparse region using the FSCTL_SET_ZERO_DATA
ioctl.

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/