RFC: deprecate allocation roundup size

Christof Schmitt cs at samba.org
Tue Jun 18 18:56:13 UTC 2019


On Tue, Jun 18, 2019 at 04:43:58PM +0200, Björn JACKE via samba-technical wrote:
> Hi,
> 
> I was debugging a problem with strict allocate = yes and our current default of
> "allocation roundup size", which is 1MB. While I understand that a large
> allocation roundup size was supposed to the a performance tuning for old SMB1
> clients, this has the side effect that with "strict allocate = yes" this makes
> even small files take at least 1MB on the disk, because smbd allocates that
> ammount of disk space which is given back by smb_roundup. This is an issue for
> some setups, because the extra ammount of needed disk space can be huge
> actually.
> 
> To work around the issue, I tested to remove the smb_roundup in places wherere
> disk space allocation is being done so that the allocation roundup size value
> is only used to announce this 1MB "block size" to the clients. I'm not sure if
> there can be other negative side effect thought if we announce that large block
> size but behave with the actual space allocation with out normal small block
> size.
> 
> As this performance trick is not needed for modern SMB clients any more, it
> might also be be better idea to just reset the value of "allocation roundup
> size" to 4k again, deprecate the option and remove it with one of the next
> releases completely to behave more windows standard conforming and to just cut
> off this source of irritation.

+1

I ran into the same problem. As this seems to be not necessary any more,
deprecating it and removing it later seems sensible.

Why are you proposing setting the default to 4k? We could just flag the
parameter as deprecated and change the default to 0 and then remove it
in a later release.

Christof



More information about the samba-technical mailing list