[Samba] samba performance when writing lots of small files

Stefan Kania stefan at kania-online.de
Thu Sep 26 19:19:29 UTC 2019


Hi Thoralf,

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

Stefan

Am 25.09.19 um 16:37 schrieb thoralf schulze via samba:
> hi there,
>
> running a simple test like
>
> time for s in $(seq 0 9999); do echo hello > world-$s; done
>
> takes a little more than a minute on a locally mounted test share on our
> samba server. the same test finishes in about 5 seconds when it is run
> on the server's file system, without samba.
>
> i understand that dealing with many small files isn't exactly the sweet
> spot of any (networked) file system. however, more than one order of
> magnitude seems a little much …
>
> the samba version is 4.7 from ubuntu bionic running in a clustered
> environment with two servers. the underlying file system is a cephfs, so
> server-side os caches _should_ not intervene in both test cases - fwiw,
> running sync immediately after the file system only-test returned at once.
>
> googling around, we already tuned the server like this:
>
>         kernel change notify = no
>         change notify = no
>         read raw = Yes
>         write raw = Yes
>         aio read size = 1
>         aio write size = 1
>
> and also enabled the aio_pthread vfs module. we found that seemingly
> relevant client-side options (cache=loose,fsc) made hardly any
> difference. during both tests, the server was mostly idling.
>
> do you have any recommendations on how to further improve sambas write
> performance for this use case?
>
> thank you very much & with kind regards,
> thoralf.
>
>
-- 
Stefan Kania

hkp://subkeys.pgp.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20190926/bb428fb7/signature.sig>


More information about the samba mailing list