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

Aurélien Aptel aaptel at suse.com
Thu Feb 14 19:55:48 UTC 2019

Saurabh Nanda <saurabhnanda at gmail.com> writes:
> There is something going horribly wrong with my configuration. Notice that
> CIFS version in the debug output below --

CIFS version is the kernel module version, not the protocol version used
for the connection. Nothing horribly wrong there.

> Will this in any way interfere with "case sensitive = yes" -
> https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#NAMEMANGLINGSECT
> ?

The kernel client tries to be case sensitive by default as well, I don't
think there's a problem there either.

>> *  mapposix has been default for a while, it maps reserved characters (: ?
>>   \ " etc) to reserved unicode characters to/from the servers so you can
>>   use those characters in file names transparently from linux, without
>>   needing to rely on protocol extensions.
> Again, this sounds like it directly conflicts with `nounix`!

No, nounix means server doesn't support unix extensions (cannot create
symlinks, block/char devices, unix sockets, ...)

mapposix is just character remapping in the filenames and doesn't
require any specific extensions. You write to a file "foo*bar.txt",
kernel will actually send "foo<some weird unicode char>bar.txt" and when
it receives filenames it does the opposite remapping.

> I have a 1.3 GB capture.pcap from the command you shared earlier. `ls -lR`
> ran only for a few minutes, and ended up generating so much network
> chatter!

Yes, I warned you about the size. As I said in my previous email, you
can try to compress it (gzip mycapture.pcap) or capture for a smaller
amount of time.

> Btw, I have `smb encrypt = required` on the server config. Ideally, I would
> hope, the network capture would be useless!

Try disabling encryption then. See if it works better. If it doesn't at
least the capture will be in clear for analysis. We could also decrypt
it by dumping the session keys but this will require building your own
samba or your own kernel. [1]

> Apart from network capture, is there any debug logging that I can enable to
> give similar insights?

You can make the kernel more verbose, but given the amount of data it
will be extremely noisy. See [2].

1: https://wiki.samba.org/index.php/Wireshark_Decryption
2: https://wiki.samba.org/index.php/Bug_Reporting#cifs.ko

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