[Samba] samba performance when writing lots of small files

Jeremy Allison jra at samba.org
Wed Nov 6 21:39:52 UTC 2019


On Wed, Nov 06, 2019 at 03:18:24PM +0100, thoralf schulze via samba wrote:
> hi Stefan / all,
> 
> resurrecting this thread …
> 
> On 9/26/19 9:19 PM, Stefan Kania via samba wrote:
> > try to use a newer version of Samba 4.7 is already outdated. The Problem
> > the smb-protocol and not Samba it self. As Steve French mentioned on the
> > last SambaXP it will be much better with Linux 5.x. So maybe you try a
> > new kernel
> 
> root at plattentest:~# uname -a
> Linux plattentest 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC
> 2019 x86_64 x86_64 x86_64 GNU/Linux
> root at plattentest:~# dpkg -l samba
> […]
> ii  samba          2:4.10.7+dfsg-0ubuntu3 amd64        SMB/CIFS file,
> print, and login server for Unix
> root at plattentest:~# time for s in $(seq 0 9999); do echo $s >
> /tubfs/test/10.000/test-$s; done # this directory is a cephfs mount
> 
> real	0m5.921s
> user	0m0.515s
> sys	0m0.861s
> root at plattentest:~# time for s in $(seq 0 9999); do echo $s >
> /mnt/10.000-cifs/test-$s; done # this is the former re-exported via samba
> 
> real    13m27.317s
> user    0m0.881s
> sys     0m6.326s
> root at plattentest:~# cat /etc/samba/smb.conf
> [global]
>         kernel change notify = no
>         change notify = no
>         read raw = Yes
>         write raw = Yes
> [test]
>         path=/tubfs/test/
>         guest ok = yes
>         force user = root
>         writeable = yes
>         aio read size = 1
>         aio write size = 1
> root at plattentest:~# mount | grep test
> //localhost/test on /mnt type cifs
> (rw,relatime,vers=3.1.1,sec=none,cache=strict,uid=0,noforceuid,gid=0,noforcegid,addr=127.0.0.1,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
> root at plattentest:~#
> 
> mounting the share with cache=loose, nostrictsync and noblocksend adds
> another minute, adding "aio write behind = *" to the share definition
> does next to nothing. neither cpu nor ram are bottlenecks.

This is re-exporting via ceph whilst creating 1000 files,
yes ? What timings do you get when doing this via Samba
onto a local ext4/xfs/btrfs/zfs filesystem ?



More information about the samba mailing list