RFC: deprecate allocation roundup size

Andrew Bartlett abartlet at samba.org
Tue Jun 18 17:40:53 UTC 2019


On Tue, 2019-06-18 at 16:43 +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.

Certainly now is the time to be doing deprecation.  This option has had
other consequences, with some clients reporting massive 'in use' sizes
for short files, to the confusion of our users.

Deprecation is harmless, so we should do at least that, and changing
the default back is user-visible but at least recoverable (while the
option still exists).  Perhaps we should be fixing the bug above also,
that seems quite wrong, but it is a matter of resources (pardon the
pun).

Andrew Bartlett
-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba





More information about the samba-technical mailing list