[Samba] large smbXsrv_session_global.tdb?

Michael Tokarev mjt at tls.msk.ru
Thu Jan 23 11:21:42 UTC 2025


Hi!

I noticed that on samba servers we've rather large smbXsrv_session_global.tdb
files, even when number of sessions isn't large.  For example:

-rw------- 1 root root 291770368 Jan 23 14:12 /run/samba/smbXsrv_session_global.tdb

this is almost 300Mb. `smbstatus -p` shows just 98 sessions.

tdbdump shows about the same amount of records, each of which is kinda
large, so it sums up.

On another machine, which is a stand-alone server not joined to a
domain, this file is just 19Mb, while the amount of sessions for this
server is about 2.5k.

We're to migrate users from this non-domain-joined server to the one above, -
if I interpolate, approx 3Mb is needed for a session on the new server, so
for 2.6K users this will be 7.8Gb just for smbXsrv_session_global.tdb.
And since this file is stored in /run, it needs to be in RAM, - so we'll
have to increase the RAM size *just* to store the session info.

What's stored in each session record, and is there a way to decrease
the size of it?

Thanks,

/mjt



More information about the samba mailing list