[Samba] Debugging a performance issue

Stefan G. Weichinger lists at xunil.at
Sat Mar 27 08:58:47 UTC 2021


Debian 10 domain member server with Version 4.13.5-Debian

The hardware is some years old, 4 SAS disks (HUC101830CSS204) in hw 
RAID6, RAID intact.

2 gigabit NICs bonded on a uptodate switch. So ... not too bad.

There are a few shares, one of them with a software that users start 
from the network share (older accounting software). They start the 
software from share1 and work with data on share2.

The customer tells me that there are specific tasks in the software that 
take a few minutes when run in that setup.

The same task with the same customer data is much much faster when run 
locally on the customer's PC.

OK, expected. A modern SSD, locally ... etc etc

But I don't think it should be minutes versus seconds, right?

Now I wonder what I could improve, aside from selling a new server.

My smb.conf is rather untouched over the years, I remember I maybe 
should get rid of the "force" lines:

         dedicated keytab file = /etc/krb5.keytab
         kerberos method = secrets and keytab
         load printers = No
         log file = /var/log/samba/%m.log
         logon home = ""
         logon path = ""
         map to guest = Bad User
         max log size = 150000
         netbios name = SERVER
         printcap name = /dev/null
         realm = MYDOM.AT
         security = ADS
         template homedir = /mnt/samba/Daten/%U
         template shell = /bin/bash
         username map = /etc/samba/smbusers
         winbind offline logon = Yes
         winbind refresh tickets = Yes
         winbind use default domain = Yes
         workgroup = BUERO
         full_audit:priority = notice
         full_audit:facility = local5
         full_audit:success = mkdir rmdir read pread write pwrite rename 
         full_audit:failure = connect
         full_audit:prefix = %u|%I|%m|%S
         idmap config buero:range = 10000-99999
         idmap config buero:backend = rid
         idmap config *:range = 2000-9999
         idmap config * : backend = tdb
         hosts allow = localhost 192.168.16. 172.32.99.
         map acl inherit = Yes
         printing = bsd
         vfs objects = acl_xattr

         browseable = No
         comment = Home Directory
         invalid users = root bin daemon adm sync shutdown halt 
mailnewsuucp operator
         read only = No
         valid users = %S

         comment = Daten
         create mask = 0775
         directory mask = 02775
         force directory mode = 0775
         path = /mnt/samba/
         read only = No
         veto oplock files = /*.DAT/*.dat/

         comment = acounting software
         create mask = 0775
         guest ok = Yes
         path = /mnt/samba/my_software
         read only = No


That "veto oplock files" line comes from an earlier try to optimize 
things, afaik.

I assume I should get rid of stuff like "force directory mode" and 
"create mask" ?

Does that have an impact on performance?

The audit VFS module has been commented already long ago, just the old 
config lines still in place.

"log level" down to 0?

I will monitor such a problematic task next week and see if the load 
goes up or if there are dozens of files opened at once.

I assume it's maybe some locking issue or so.

Hints welcome, thanks all.

More information about the samba mailing list