SMB/CIFS enable large rsize/wsize to netapp
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.
centos samba cifs smb
add a comment |
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.
centos samba cifs smb
add a comment |
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.
centos samba cifs smb
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.
centos samba cifs smb
centos samba cifs smb
asked Feb 15 '17 at 2:31
Boffhead
13
13
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f345094%2fsmb-cifs-enable-large-rsize-wsize-to-netapp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
add a comment |
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.
add a comment |
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.
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.
answered Jun 1 '17 at 1:54
Rui F Ribeiro
38.9k1479129
38.9k1479129
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f345094%2fsmb-cifs-enable-large-rsize-wsize-to-netapp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown