High CPU Usage on Samba Service

Hello everyone!

I’ve been facing a high processing issue where my server’s CPU usage hits 100%. Using the NetData tool, I was able to identify which service is causing the high processing.

This problem occurs a few times a day and lasts for about 5 to 10 minutes. Sometimes it takes longer and only normalizes when I restart the Samba service.

The biggest issue is that I have an internal email and web Browse (proxy) server. There are almost 300 users, and all of them are synchronized with the Nethserver’s AD. During this high processing, communication stops, and it constantly asks for a username and password. This has been causing a lot of trouble, and I don’t know how I can fix it. Has anyone experienced this or knows how I can correct it?

Here is some information about my environment that might help:

Physical Server CPU: 12 x Intel(R) Xeon(R) E-2336 CPU @ 2.90GHz (1 Socket)
Memory: 62GB
SSD: 1TB (Proxmox)
SAS HD: 8TB (Nethserver)

Virtual Server Memory: 8GB
CPU: Type Host, Processors: 8 (1 socket, 8 cores) numa=1
HD: 6TB cache=writeback,discard=on,iothread=1
OS: Debian 12

podman-init. Please, in Netdata, check if the high CPU usage correlates with high process fork rate.

1 Like

Sorry davidep, but how can I check this? I have no knowledge in netdata.

I discovered this information by chance, as I was trying to look for something that would help me find this process that was consuming CPU.

Look at the Netdata graph “Started Processes - system.forks - [processes per second]”. I’m asking if this graph correlates with the high CPU load.

Other interesting correlations can be:

  • Disk IOPS
  • Network traffic

Does the outage occur at random times, or during working hours? How many clients are using Samba at the same time? Is Samba acting as unique DNS for them, or do they use another DNS server?

1 Like

Random times

At this moment 170 users are connected, but the average is almost 200

I’m using samba as the primary DNS.

The images shared are from the same day I posted here on the forum

While it may fit home/small office needs, Samba’s internal DNS is known to have performance limitations to some extent.

I’m not sure if the high CPU load occurs due to Samba’s internal DNS, but given your numbers, I’d configure DNS on a separate network appliance that supports conditional DNS zone forwarding, as suggested by the Samba Team[1].

The AD zone (and only that) can then be conditionally forwarded to Samba, offloading it from the high DNS traffic that I suspect your clients are generating.


  1. https://lists.samba.org/archive/samba/2020-May/229863.html ↩︎

1 Like