0

I’m connecting from a Centos 7.2 client to a Netapp cifs fileshare. We had to swap over from NFS as we lost 30% of space due to a lack of “hole drilling”.

Performance has slowed down due to cifs and I’m trying to make it faster.

I’m trying to bump the rsize and wsize:

linux.die.net/man/8/mount.cifs rsize=arg

To use rsize greater than 127K (the original cifs protocol maximum) also requires that the server support a new Unix Capability flag (for very large read) which some newer servers (e.g. Samba 3.0.26 or later) do. rsize can be set from a minimum of 2048 to a maximum of 130048 (127K or CIFSMaxBufSize, whichever is smaller)

wsize=bytes

As of RHEL6.2, the default depends on whether the client and server negotiate large writes via POSIX extensions. If they do then the default is 1M, and the maximum allowed is 16M. If they do not, then the default is 65536 and the maximum allowed is 131007. Note that this value is just a starting point for negotiation. The client and server may negotiate this size downward according to the server's capabilities.

I enabled the unix extensions (POSIX) from the netapp side: Y::*> vserver cifs options show -vserver X Is UNIX Extensions Enabled: true

[-is-unix-extensions-enabled {true|false}] - Is UNIX Extensions Enabled (privilege: advanced) When set to true, this optional parameter enables the UNIX Extensions feature in the CIFS server. If set to false, the UNIX Extensions feature is disabled. The default for this parameter is false. UNIX Extensions allows POSIX/UNIX style security to be displayed through the CIFS protocol.

And it looks like to enable the large read/writes you need to add the following to /etc/samba/smb.conf: (global section) min receivefile size = 16384 (set to a non zero value)

https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html “min receivefile size (G) To enable POSIX large write support (SMB/CIFS writes up to 16Mb) this option must be nonzero”

However when I mount with no size options specified I can see SMB negotiates to rsize=65536,wsize=65536 and not a larger 1M-16M value //IP/MOUNT on /opt/DIR type cifs (rw,relatime,vers=3.0,sec=ntlmssp,cache=none,username=BLAH,domain=DOMAIN,uid=0,noforceuid,gid=0,noforcegid,addr=IP,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=65536,wsize=65536,actimeo=1)

I then also tried setting this to a value greater than 65k for no effect: [X ~]# cat /etc/modprobe.d/cifs.conf options cifs CIFSMaxBufSize=130048

What am I missing? Have I not enabled the correct netapp unix flag? Do I need to enable a large buffer cifs flag somewhere on centos? I've got layer 2, 9k jumbo frames between the and the client has loads of RAM (32gb) so I should be fine bumping the size performance wise.

0

By default cifs mounts use protocol 1.0, which besides obsolete is largely inefficient and does not recover well from sleep for several reasons.

Depending on what is your server technology, you can go from using vers=2.1 at least, or vers=3.0.

Please check with the vendor the supported CIFS protocol or try vers=3.0 and use mount to check the negotiated version.

Please see the related question CIFS randomly losing connection to Windows share for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.