[PATCHES v2 BUG 13865] Properly track the size of talloc objects
jra at samba.org
Fri Apr 5 22:43:45 UTC 2019
On Fri, Apr 05, 2019 at 03:34:17PM -0700, Christof Schmitt wrote:
> Anything we choose is a guess, since every workload is different. On a
> quick test to open multiple files with smbclient and then checking size
> allocated under 'struct memcache' in smbcontrol pool-usage, shows that
> each open file increases the memory usage by something like 300 to 700
Actually that data is very useful.
> So that 16k for each share mode seems high, although that might increase
> with concurrent access to the same file. 4k for each getwd cache also
> seems high, that seems to mainly depend on the length of the path name.
With much concurrent access we store more share mode data,
but reasonably that value is probably at max 1K per file
> Rounding the share mode size up to 1024 bytes and the getwd length to
> 1024, and assuming one getwd cache for each open file (probably also too
> high), that would yield 100 * 1024 + 100 * 1024 = 200k
> That would be more in line with doubling the state cache size from 256
> to 512 (kB).
Yeah, thinking about this some more I'm OK with 512k or 1Mb.
I'll let you chose and send the patch :-).
Remember to tag with bug:
So we can keep everything together for the back-port.
FYI, I already set an autobuild going on sn-devel with your
More information about the samba-technical