[Samba] gencache.tdb size and cache flush

Francesco Malvezzi francesco.malvezzi at unimore.it
Tue Sep 4 09:59:04 UTC 2018

Il 04/09/18 06:00, Volker Lendecke ha scritto:
> Hi!
> Technical description below, but the exec summary is: Yes, we have a
> performance problem with gencache.
> On Wed, Aug 29, 2018 at 10:28:05AM +0200, Francesco Malvezzi via samba wrote:
>> Hi all,
>> I have a midsize AD domain with some 50k users but only 100 workstations
>> joined.
>> Sometimes I find server CPU throttling at 100%. In order to let it drop
> Can you find out where *exactly* that 100% is spent? gstack on the
> spinning process with debug symbols would be very helpful here.

not sure how to do it.

can be like that

>> and have smooth performance I delete cache:
>> systemctl stop samba
>> net cache flush
>> systemctl start samba
>> First of all, is it needed a samba stop to flush the cache?
> No.

thank you.

>> Even if cache flush does the job to restore performance, I am clueless
>> about the root cause of the problem. Before flushing cache the
>> gencache.tdb had 15k entries. Is it large? Do you think is it worth time
>> to investigate why it grows so much or is it just normal?
> 15k entries is not really silly large. I've seen much larger ones.
> What kind of OS do you have? The question is -- does it have the
> ability to use robust mutexes? (FreeBSD 11 and recent Linux).

Debian GNU/Linux 9 (stretch)
Linux addc 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u3 (2018-08-19)
x86_64 GNU/Linux

I absolutely agree to the need to further investigate. The gencache
trail was just a suspect. What I know for sure is I have high spike
loads from a PID with label: "samba: task[dcesrv]".

The stop/delete cache/start procedure actually works, but I am more and
more likely to believe the "delete cache" part is just useless.

thank you,


More information about the samba mailing list