[Samba] Samba 4.9.4 - high RAM usage - OOM killer
timbeale at catalyst.net.nz
Mon Jan 28 21:50:01 UTC 2019
Actually, you could try starting samba with --model=prefork on 4.9.
Samba 4.9 doesn't properly support distributing the NETLOGON connections
amongst separate prefork worker processes. But using the prefork process
model on 4.9 will mean that there is a single rpc_server process to
handle all NETLOGON connections (instead of forking a separate process
for each connection, like it's doing currently). Having a single
rpc_server process should be sufficient to handle ~700 connections.
On 29/01/19 9:53 AM, Tim Beale via samba wrote:
> It looks like what is happening is the Samba RPC server is forking a
> separate process for each NETLOGON connection it accepts. Normally, when
> the connection is closed, the child process will be cleaned up. On your
> setup, the connections appear to be left open (presumably due to the
> constant mail SSO queries), and so the rpc_server processes just
> accumulate. You had 669 rpc_server processes, which sounds like roughly
> one per user.
> On Samba v4.10, there will be better handling of these NETLOGON
> connections using the prefork process model. Instead of forking a
> separate process for each NETLOGON connection, a set number of worker
> processes will be pre-forked when samba first starts up, and the RPC
> connections will be shared amongst these worker processes. To use
> prefork, specify '--model=prefork' as arguments when starting Samba.
> Unfortunately, the scheduled release date for v4.10 isn't until 5 March
> 2019. Note that the prefork option does exist in v4.9, however, there is
> no prefork support in 4.9 for the RPC server process. I'm not sure what
> you can do in the meantime, other than restart the DCs regularly.
> Best regards,
> On 29/01/19 5:19 AM, Laurent CARON via samba wrote:
>> Hi Denis,
>>> could you please take a look at which process is taking so much RAM?
>>> Is there a pile of smbd process around? If you are using Bind-dlz,
>>> how much memory named is eating? Is is the increase in RAM
>>> consumption is linear over time?
>>> If it is a "samba" process that is eating all the RAM, please check
>>> the PID and the samba-tool processes command to report which part of
>>> samba is weaking havoc the system.
>>> I'd say you should be fine with 4GiB with such a setup...
>> Seems lots of samba processes related to rpc_server are making the
>> server crawl (please see attachment) after just 6 days of uptime.
>> I can provide a strace of the most CPU/IO hungry process upon request.
More information about the samba