What's new

smbd ( /etc/smb.conf ) use 100% cpu - RT-AX86U

  • 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!

rankok

Occasional Visitor
As the title says, I have an issue with SMB and CPU usage.

Asus RT-AX86U
Firmware Version:386.4
clean, restarted, rebooted, only configured a few things not even installed anything besides Entware packages and swap file.
USB disk formated using AMTM "Format disk" script, made 2 partitions one for AMTM (EXT4) and other for network share (NTFS)

I was using this configuration for about 5-6 years on AC87U and not even once had issues with smbd.
When I disable

I tried even all from the beginning, reset the router, and the same thing happens.
screenshot htop ; fdisk -l screenshot

Anybody can help?
 
It looks like you have multiple connections from one or more LAN devices. They're probably tripping over each other trying to access the same files.

Check the client connections and try turning off some of the clients.
Code:
netstat -anp | grep smbd
 
Have you rebooted the PC?

Check that the Samba user account and shared folders have been setup correctly through the GUI.
 
Have you rebooted the PC?

Check that the Samba user account and shared folders have been setup correctly through the GUI.
rebooted a couple of times. One user, root (r/w).
even when shutdown PC, and using the laptop on wifi, the same issue happens...
 
Just now I tried to use the second SATA2USB adapter and SSD to test is a disk or adaptor issue... but same behavior...
 
Try this:
Code:
chmod -R 777 /mnt

If that doesn't work post the contents of your /etc/smb.conf file.
 
Try this:
Code:
chmod -R 777 /mnt

If that doesn't work post the contents of your /etc/smb.conf file.

It's alredy 777: lrwxrwxrwx 1 rankok root 7 Jan 1 20:26 /mnt -> tmp/mnt


Bash:
[global]
netbios name = RT-AX86U
server string = RT-AX86U
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 = 9
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.2.1/255.255.255.0
use sendfile = yes
map archive = no
map hidden = no
 
It's alredy 777: lrwxrwxrwx 1 rankok root 7 Jan 1 20:26 /mnt -> tmp/mnt
But the directories and files beneath the mount point may not be. That's why I asked you to use the "-R" option.

You don't have any shared folders in your smb.conf file, or have you posted an incomplete file?

You have posted an incomplete smb.conf file. You're missing the entire second half of the file. Please post the complete file.
 
Last edited:
Sorry for that, a bad copy-paste, I attached the conf file now.

p.s. I was run command anyway, but the issue persist ...
 

Attachments

  • smb.txt
    2.1 KB · Views: 115
You may be better off with two drives. One for swap and Entware formatted to EXT4. This should be a SSD or thumb drive. The other anything you want to use. But if a spinning rust drive it needs to be external powered.
 
Sorry for that, a bad copy-paste, I attached the conf file now.

p.s. I was run command anyway, but the issue persist ...
The config looks fine. I'm assuming that your Windows PC is logged in using a local user account called rankok as you haven't created any other user accounts?

Look for errors in the following files:
Code:
cat /var/log/samba.log
cat /var/log/log.smbd
cat /var/log/log.nmbd
 
I looked in logs in the morning and last night didn't find anything strange...

Today I got angry, so I turned off all PC in the house...and I went outside... when I come back I used the terminal on my smartphone and saw that router is without any process that cause the CPU to hit 100%.
So this gives me the idea to try some windows that is fresh (not used on my network before) ... and you know what happened? everything is as it should be...

So I grab a USB and reinstall one of my PC - and everything is good after so I tried again to start one of that problematic ones, cleared all Windows Credentials, and reset the network. Issue gone.

So

I solved this by accident. (if the problem does not return)

My only concern after this one, is regarding firmware - is this behavior normal? can be prevented?

Big tanks @ColinTaylor!
 
Glad to hear you found a solution.

My only concern after this one, is regarding firmware - is this behavior normal? can be prevented?
No it's not normal behaviour. The information you posted previously suggested that the PC at 192.168.2.154 was hammering the SMB connection. I've occasionally seen Windows behave like this, but that's a Windows issue not a router issue.
 
Glad to hear you found a solution.


No it's not normal behaviour. The information you posted previously suggested that the PC at 192.168.2.154 was hammering the SMB connection. I've occasionally seen Windows behave like this, but that's a Windows issue not a router issue.
Is there any way to prevent windows to hamering router cpu? some scritp to make?
 
Is there any way to prevent windows to hamering router cpu? some scritp to make?
Like I said, this is something Windows is doing not the router. So the solution is to identify what's causing the problem in Windows and fix that. Another approach is to not use the router for SMB shares, so any reoccurrence of the problem is moved to a less sensitive device.
 

Sign Up For SNBForums Daily Digest

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