Hi, I'm running Samba AD DC in a VM under Proxmox. And it's eaten all RAM (1.8GB) within 3 days of running: [root at vm-dc3 var]# uptime 19:02:54 up 3 days, 5:04, 2 users, load average: 0.01, 0.05, 0.05 [root at vm-dc3 var]# free -m total used free shared buff/cache available Mem: 1752 1362 205 2 184 237 Swap: 1023 236 787 [root at vm-dc3 var]# ps -ef|grep samba | wc -l 61 Full process list is available here: https://paste.ee/p/dscce [root at vm-dc3 etc]# cat smb.conf # Global parameters [global] netbios name = VM-DC3 realm = DOMAIN.COM server role = active directory domain controller server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd, ntp_signd, kcc, dnsupdate, dns workgroup = DOMAIN dns forwarder = 172.26.1.1 ntlm auth = mschapv2-and-ntlmv2-only log level = 3 max log size = 5000 [sysvol] path = /usr/local/samba/var/locks/sysvol read only = No [netlogon] path = /usr/local/samba/var/locks/sysvol/domain.com/scripts read only = No Is there anything I can do to restrict memory usage by Samba? It's probably worth noting, that our Windows 2008 R2 AD DC is also running in a VM and using 1.5GB only (of 2GB allocated). Please, advise! -- Best regards, Alex
On Mon, 2020-02-17 at 19:11 +0300, Alex via samba wrote:> I'm running Samba AD DC in a VM under Proxmox. And it's eaten all RAM (1.8GB) within 3 > days of running:Exactly which version is this? Which sub-process is eating the memory? Can you get a talloc dump using 'smbcontrol $PID pool-usage' for whichever PID is leaking the memory? Does the problem reproduce on a current Samba 4.11? Our new LDAP server design is much more memory efficient, particularly if you have pathological clients that search for the whole DB and then keep the socket open. 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
Hello Andrew,> On Mon, 2020-02-17 at 19:11 +0300, Alex via samba wrote: >> I'm running Samba AD DC in a VM under Proxmox. And it's eaten all RAM (1.8GB) within 3 >> days of running:> Exactly which version is this?Sorry, forgot to mention it. Samba version is 4.11.6. Some more info (if needed): [root at vm-dc3 ~]# wbinfo -u | wc -l 62 [root at vm-dc3 ~]# wbinfo -g | wc -l 78> Which sub-process is eating the memory?I was trying to determine that w/o success. Looks like all Samba processes do that.> Can you get a talloc dump using 'smbcontrol $PID pool-usage' for > whichever PID is leaking the memory?Not sure which one is _leaking_ the memory, so I took the one which ate memory more than the others (by "ps auxw"). Please, find the report here: https://www.dropbox.com/s/76qdq1x89brmib0/samba.1520.pool-usage.txt.gz?dl=0> Does the problem reproduce on a current Samba 4.11?Yes, it's on the latest.> Our new LDAP server design is much more memory efficient, particularly > if you have pathological clients that search for the whole DB and then > keep the socket open.I don't think we have such clients. -- Best regards, Alex