[Samba] Third Try: Huge number of small files performance regression from 3.5.16 to 4.6.5 with identical smb.conf

Jeremy Allison jra at samba.org
Fri Jul 14 17:41:28 UTC 2017


On Fri, Jul 14, 2017 at 04:19:09PM +0200, awl1 wrote:
> [global]
> server string = %h
> max open files = 100000
> deadtime = 15
> dead time = 15
> hide unreadable = yes

Remove the above. Causes security descriptor lookup for every directory entry.

> load printers = no
> log file = /var/log/samba.%m
> max log size = 50
> strict locking = no
> lock directory = /var/samba
> encrypt passwords = yes
> case sensitive = true
> default case = lower
> preserve case = yes
> short preserve case = yes
> passdb backend = tdbsam
> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE

Remove the above - voodoo bullsh*t not needed on modern kernels.

> aio read size = 1
> aio write size = 1
> write cache size = 2097152

REMOVE THE ABOVE WITH PREJUDICE !!!!!

Where did this come from ? That code can have significant
effects on allowing async/oplocks etc.

> read raw = yes
> write raw = yes

Remove the above - only needed for SMB1.

> min receivefile size = 0
> use sendfile = yes
> large readwrite = yes

Remove the above. SMB1 only.

> max xmit = 32768

Remove the above. May have devastating effects.

> getwd cache = true
> map untrusted to domain = yes
> os level = 1
> local master = yes
> unix extensions = yes
> domain master = no
> preferred master = no
> dns proxy = no
> dos charset = CP850
> unix charset = utf8
> client ldap sasl wrapping = seal
> allow trusted domains = yes
> idmap uid = 20000-60000000
> idmap gid = 20000-60000000
> winbind separator = +
> winbind nested groups = yes
> winbind enum users = yes
> winbind enum groups = yes
> create mask = 0644
> winbind use default domain = yes
> map acl inherit = yes
> nt acl support = yes
> #map system = yes
> bind interfaces only = yes
> interfaces = lo,bond*
> guest account = nobody
> map to guest = Bad User
> guest only = yes
> follow symlinks = no
> block size = 262144
> dfree cache time = 5
> large readwrite = yes

Remove the above. SMB1 only.

> getwd cache = yes
> oplocks = yes
> kernel oplocks = yes

Remove the above. If you're not sharing via
multiple protocols then this will make things
worse.

> veto files = /folder.db/.AppleDouble/.AppleDB/.bin/.AppleDesktop/Network Trash Folder/:2eDS_Store/.DS_Store/TheFindByContentFolder/TheVolumeSettingsFolder/Temporary Items/.AppleDBcnid.lock/.VolumeIcon.icns/.Temporary Items/.Parent/.HSicon/._*/:*/
> veto oplock files = /J0*.WMF/*_.GIF/J0*.JPG/*_.WMF/

Remove the two lines above. Why are they needed ?

> workgroup = WORKGROUP
> password server = *
> security = user
> auth methods = guest sam_ignoredomain
> realm =
> idmap backend = rid:WORKGROUP=20000-60000000
> wins server = 192.168.1.1
> client ntlmv2 auth = no
> server signing = disabled
> smb encrypt = disabled
> delete veto files = yes
> 
> [Work]
> comment = Work
> browseable = yes
> guest only = no
> path = /raid0/data/Work
> map acl inherit = yes
> inherit acls = yes
> read only = no
> create mask = 0777
> force create mode = 0000
> inherit permissions = Yes
> map archive = yes
> map hidden = no
> store dos attributes = no
> valid users = @smbadmin, at smbwork,user1
> invalid users = user2,upload
> read list = backup
> write list = @smbadmin, at smbwork,user1

Start with a small, clean smb.conf file. This one is a horrible
mess looks like accumulated over many years.

Jeremy.



More information about the samba mailing list