high cpu load after restart smbd

Asked by imker

Hello everybody,

since a view versions I can observe the following behaviour of my samba installation on ubuntu 16.04 (Package Version: 4.3.11-Ubuntu).

When I restart the samba service, e. g. after installing samba updates, the nmbd process start to consume all the CPU available (100 % load on all cores).
I found out that it does not help to restart the samba service or the whole server.

But what helps when I umount the shares from all clients that use the smb shares via smbfs and then mount the shares again. As soon as all clients remounted all shares the CPU load of all samba related processes is fine again on the server. Funny detail: The clients don't show any strange behaviour before I remount the shares.

My Clients using smbfs are Ubuntu 16.04 and Ubuntu 17.04 installations with default samba packages.
By the way. I don't need to touch my windows clients to solve this.

Do you have any idea why this happen, and how to avoid?
Thanks
Imker

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu samba4 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you are using Ubuntu clients then why use Samba? If you have openssh-server running then your Ubuntu clients can mount SSHFS.

Revision history for this message
imker (imker) said :
#2

Well, there are several reasons why I use smb and not sshsf for this.

1. Better access right control. It's quiet easy to set different umask, access control... for each smb share. It would not be easy to setup this with sshfs that accurate. And not all smb client users have ssh access to the file server

2. Performance: SSHFS causes much more load on client and server as smbfs

3. Common administration: It helps a lot that I have to configure the shares only once for Windows and Linux clients.

By the way, I find it a bit rude when the fist answer points on different technology. Most times there are reasons why people doing thing like they do.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

The access control is actually better in SSHFS because it follows the Linux permissions. In Samba, all you can do is give access to the share and below. There is no granularity.

Yes it's easier for Windows systems as you say.

Suggesting different solutions is good if someone chooses poorly. I see Samba as a poor choice so suggested an alternative. It wasn't meant to be rude and for that I apologize. I just want users to use the best solution for their needs. For pure Linux setups I always suggest SSHFS / SFTP.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

I found this:

https://serverfault.com/questions/780945/high-cpu-load-on-synology-by-smbd

Looks like you need additional lines in smb.conf

Revision history for this message
imker (imker) said :
#5

Hello,

I tried the config lines from your post, but the behaviour is still the same.
Any other ideas or hints?

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.