[Samba] 32 seconds vs 72 minutes -- expected performance difference?

Aurélien Aptel aaptel at suse.com
Thu Feb 21 18:56:34 UTC 2019

Saurabh Nanda <saurabhnanda at gmail.com> writes:
> Help in analysing the tcpdump to get to the bottom of this perf issue would
> be appreciated.

I've looked at the trace but didn't find anything out of the
ordinary. The "STATUS_NO_MORE_FILES" is erroneously taken into account
in the stats because your kernel is missing this patch:


So another red herring I'm afraid :(

Looking at the Service Response Time (SRT, time between request &
response) stat in wireshark we see this:

SMB2 SRT Statistics:
Filter: smb2.cmd
Index  Commands               Calls    Min SRT    Max SRT    Avg SRT    Sum SRT
    5  Create                  14759   0.000387   0.035268   0.001288  19.003702
    6  Close                   14713   0.000253   0.029454   0.000629   9.260241
   14  Find                    27468   0.000237   0.035798   0.000678  18.634827
   16  GetInfo                   983   0.000276   0.020349   0.000553   0.543487

The way SMB works, you call Create() to open the directory, then call
Find() repeatedly on the handle you get to list its content, then

In your trace each Create operation takes about 0.0013s on average,
which I can't really say if it's excessive but its taking a lot of the
capture length when you sum them all (19s out of the minute-long trace
you sent).

You should look on the server side maybe, in the logs (try to raise "log
level" in your smb.conf). I'm less knowledgeable on samba perf tweaks
though so hopefully someone else will shine some light.

Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

More information about the samba mailing list