Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] smb2 vs. NT1

1,992 views
Skip to first unread message

Papp Tamas

unread,
Feb 25, 2013, 3:50:01 AM2/25/13
to
hi All,


We have a glusterfs cluster with 5 nodes on Ubuntu 12.04 amd64.
We use this smb.conf:

[global]
socket options = IPTOS_THROUGHPUT TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=131072 SO_RCVBUF=131072
read raw = yes
server string = %h
write raw = yes
#oplocks = yes
max xmit = 131072
dead time = 15
getwd cache = yes
use sendfile=yes
block size = 131072
load printers = no
aio read size = 16384
aio write size = 16384
aio write behind = /*.*/
wins support = no
local master = no
wins server = 192.168.3.7
veto files = /.AppleDouble/
delete veto files = yes
hide dot files = yes
printing = BSD
max protocol = SMB2
min protocol = SMB2

[projects]
path = /W/Projects
browseable = yes
public = yes
guest ok = yes
read only = no
force user = user
force group = user



The speed is fine with this configuration, around 100Mbyte/s. If I change protocol to NT1, the speed
drops to around 50Mbyte/s.

This is from man page:

NT1: Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
SMB2: Re-implementation of the SMB protocol. Used by Windows Vista and newer. The Samba
implementation of SMB2 is currently marked experimental!


Why is it still experimental? What does it mean exactly? Is there anything I should avoid it, like
file corruption or so?
Why NT1 is _much_ slower then SMB2?




Thank you,
tamas
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Jeremy Allison

unread,
Feb 25, 2013, 1:30:01 PM2/25/13
to
On Mon, Feb 25, 2013 at 09:38:51AM +0100, Papp Tamas wrote:
> hi All,
>
>
> We have a glusterfs cluster with 5 nodes on Ubuntu 12.04 amd64.
> We use this smb.conf:
>
> [global]
> socket options = IPTOS_THROUGHPUT TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=131072 SO_RCVBUF=131072

Remove the above line. It's pure voodoo. Don't second
guess the kernel w.r.t. socket options.
That will be due to the async requests that the Windows SMB2
redirector uses much more than the SMB1 redirector.

> This is from man page:
>
> NT1: Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
> SMB2: Re-implementation of the SMB protocol. Used by Windows Vista
> and newer. The Samba implementation of SMB2 is currently marked
> experimental!

SMB2 in Samba is fully supported from Samba 3.6.0 onwards.
It was "experimental" (read, didn't really work :-) in
3.5.x and below.

Jeremy.

Papp Tamas

unread,
Feb 25, 2013, 2:40:01 PM2/25/13
to
On 02/25/2013 07:29 PM, Jeremy Allison wrote:
>
> On Mon, Feb 25, 2013 at 09:38:51AM +0100, Papp Tamas wrote:
>> hi All,
>>
>>
>> We have a glusterfs cluster with 5 nodes on Ubuntu 12.04 amd64.
>> We use this smb.conf:
>>
>> [global]
>> socket options = IPTOS_THROUGHPUT TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=131072 SO_RCVBUF=131072
>
> Remove the above line. It's pure voodoo. Don't second
> guess the kernel w.r.t. socket options.

It seems, you're right. However in this case the documentation in default smb.conf is wrong.

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
# socket options = TCP_NODELAY


Now this is the config:

[global]
read raw = yes
server string = %h
write raw = yes
max xmit = 131072
dead time = 15
getwd cache = yes
use sendfile=yes
block size = 131072
load printers = no
wins support = no
local master = no
wins server = 192.168.3.7
veto files = /.AppleDouble/
delete veto files = yes
hide dot files = yes
printing = BSD
max protocol = SMB2
min protocol = SMB2

[projects]
path = /W/Projects
browseable = yes
public = yes
guest ok = yes
read only = no
force user = user
force group = user


And it's much better now:)

> That will be due to the async requests that the Windows SMB2
> redirector uses much more than the SMB1 redirector.
>
>> This is from man page:
>>
>> NT1: Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
>> SMB2: Re-implementation of the SMB protocol. Used by Windows Vista
>> and newer. The Samba implementation of SMB2 is currently marked
>> experimental!
>
> SMB2 in Samba is fully supported from Samba 3.6.0 onwards.
> It was "experimental" (read, didn't really work :-) in
> 3.5.x and below.

OK, thanks for the answer and thanks so much for the tuning tips.
Every single samba tuning guide starts with that options!


Cheers,
tamas

Björn JACKE

unread,
Feb 26, 2013, 3:30:01 AM2/26/13
to
On 2013-02-25 at 20:35 +0100 Papp Tamas sent off:

> It seems, you're right. However in this case the documentation in default smb.conf is wrong.

there is no default smb.conf shipped with Samba. File a bug against the Samba
package of your distribution that you use then, please.

> >SMB2 in Samba is fully supported from Samba 3.6.0 onwards.
> >It was "experimental" (read, didn't really work :-) in
> >3.5.x and below.
>
> OK, thanks for the answer and thanks so much for the tuning tips.
> Every single samba tuning guide starts with that options!

I would also add that you should use a recent 3.6 version. There have been a
number of more or less important smb2 related bugs been fixed in the 3.6
series.

Cheers
Björn
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
☎ +49-551-370000-0, ℻ +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen

Papp Tamas

unread,
Feb 26, 2013, 4:20:01 AM2/26/13
to
On 02/26/2013 09:28 AM, Björn JACKE wrote:
>
> On 2013-02-25 at 20:35 +0100 Papp Tamas sent off:
>> It seems, you're right. However in this case the documentation in default smb.conf is wrong.
>
> there is no default smb.conf shipped with Samba. File a bug against the Samba
> package of your distribution that you use then, please.
>
>>> SMB2 in Samba is fully supported from Samba 3.6.0 onwards.
>>> It was "experimental" (read, didn't really work :-) in
>>> 3.5.x and below.
>>
>> OK, thanks for the answer and thanks so much for the tuning tips.
>> Every single samba tuning guide starts with that options!
>
> I would also add that you should use a recent 3.6 version. There have been a
> number of more or less important smb2 related bugs been fixed in the 3.6
> series.

Which version is recommended at this time, v3.6 or v4?

Thank you,
tamas

0 new messages