What's new

smbd high CPU usage

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bsoder

New Around Here
I am having an issue that I could use a bit of help with. I am running 384.19 on my AC-RT5300, and I have two 8TB drives connected to it; one is used for backups and as a general share drive, the other is intended as a backup for the first drive; I installed opkg on a small partition on the second drive and installed rsync - although I am not actively running backups between the drives right now, I've only tested it to make sure rsync works.

I have a couple macs that are backing up using Time Machine; this works fine, when one of the macs is doing its thing I can watch top and the usage runs around 3.5% of CPU, so no issues there. I also have several win boxes I am backing up using Veeam to an SMB share. The problem is, whenever one of the win boxes is backing up to the samba share, it causes the CPU load on the router to spike; according to top, the single process is using 40% CPU, and I'm attaching screengrabs of the router UI as well as the status of top when it's running ( as well as when it's not.)

I think, although I'm not 100% sure, that when two win boxes are trying to do their thing at the same time, that it locks up the router - SOMETHING is freezing it such that I have to powercycle it to get things working again.

These two are top and usage with a backup running:
server-top-smbd.pngserver-usage-smbd.png

And these two are without.
server-top-nosmbd.pngserver-usage-nosmbd.png

These are the nmbd and smbd processes that are running:
bsoder@RT-AC5300-B6C0:/tmp/home/root# ps w | grep smb
2101 bsoder 5832 S /usr/sbin/nmbd -D -s /etc/smb.conf
2102 bsoder 5524 S /usr/sbin/nmbd -D -s /etc/smb.conf
2118 bsoder 6016 S /usr/sbin/smbd -D -s /etc/smb.conf
5408 bsoder 7144 S /usr/sbin/smbd -D -s /etc/smb.conf




Here's the global section of /etc/smb.conf; I haven't modified this but just in case there's something to look at here. I can share the other subsections if needed.

bsoder@RT-AC5300-B6C0:/tmp/home/root# cat /etc/smb.conf
[global]
netbios name = RT-AC5300-B6C0
server string = RT-AC5300
workgroup = WORKGROUP
username level = 20
unix charset = UTF8
display charset = UTF8
load printers = no
printing = bsd
printcap name = /dev/null
log file = /var/log/samba.log
log level = 0
max log size = 5
security = USER
guest ok = no
map to guest = Bad User
encrypt passwords = yes
pam password change = no
null passwords = yes
force directory mode = 0777
force create mode = 0777
max connections = 5
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_KEEPALIVE
obey pam restrictions = no
use spnego = yes
client use spnego = no
disable spoolss = yes
host msdfs = no
strict allocate = no
wide links = no
bind interfaces only = yes
interfaces = lo br0 192.168.1.1/255.255.255.0
use sendfile = yes
map archive = no
map hidden = no
map read only = no
map system = no
store dos attributes = no
dos filemode = yes
oplocks = yes
level2 oplocks = yes
kernel oplocks = no
wins support = yes
os level = 255
domain master = yes
local master = yes
preferred master = yes
enable core files = no
deadtime = 30
load printers = no
printable = no
max protocol = SMB2
smb encrypt = disabled
min receivefile size = 16384
passdb backend = smbpasswd
smb passwd file = /etc/samba/smbpasswd


Any suggestions as to how to address this?
 
Your usage requirements are above your hardware's capabilities.

Next stop, a NAS.
 
This is normal. Samba is a resource hog and requires more CPU and RAM than the router can provide. It's OK for occasionally transferring the odd file but if you want to use it for large backups you need a proper NAS.
 
Yeah, that's what I figured the response would be. So any suggestions as to a particular model? Given that I already have two external drives something that uses a USB3 connection to the router and lets you connect a couple external drives via USB3 would be easiest, but I can always pull the drives themselves out of the enclosures.

I haven't worked with a NAS before - my prior backup solution was a WHS2003 box with four drives in it, that I kept limping along WAY past its expiration date. I assume any current NAS would handle duplication between two drives?
 
... something that uses a USB3 connection to the router ...
It's not a NAS if it connects to the router over USB (and you'd have the same problem you have now). A NAS connects over Ethernet. Sorry I don't have any recommendations (I use an Intel NUC running Ubuntu as a file server). Maybe look/post in the NAS Buying Advice sub-forum.
 
I will do that, thank you. As I said, I haven't done much with a NAS before, I appreciate the pointers and help.
 
QNAP is my recommendation. Buy a model with as many drive bays as you can afford. Make sure it is expandable to at least 8GB RAM. Fill at least 2 drive bays in a RAID1 array at a minimum.

If you can get a 4-drive bay or larger NAS and can put 4 or more drives initially, I would follow the following steps for the longest-term reliability and flexibility.

  • Use 2x SSD drives in RAID1 to set up the NAS without any other drives inserted into the drive bays. This will give you an almost bullet-proof NAS OS install and make the NAS as quick as possible too.
  • For the next two drives, create another RAID1 array with the largest drives you can buy. This array will be for your data.
  • Continue to do the step above for each additional pair of drive bays you can populate with the largest drives you can install.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top