# Samba 4 is half as fast as Samba 3?!



## oliver@ (Apr 16, 2014)

Hi,

I tried upgrading from my Samba 3 setup to Samba 4.1 - I do not need als those shiny AD-Features, I just need to mount the shares on two Windows 7 systems.

I use the same configuration that I used with Samba 3 (testparm says it is fine).

The simple question is - why do I reach transfer rates of ~110MB/Sec with Samba 3 and only ~45 MB/Sec with Samba 4? With such a mega-drop in performance Samba 4 is not really an option for me 

I wonder what I could have done wrong? I tried with and without the AIO option. DEBUG, PAM_SMBPASS, PTHREADPOOL are enabled, all other options are disabled. Samba 3 and Samba 4 run both in a seperate jail where the shared filesystems are nullfs mounted into. The Filesystem on the jails Host is a ZFS raidz. Bonnie++ can write to it with ~150MB/Sec.

My config is:


```
[global]
        workgroup = MYWORKGROUP
        server string = jasmin
        passdb backend = tdbsam:/usr/local/etc/samba/passdb.tdb
        log file = /var/log/samba4/log.%m
        max log size = 50
        unix extensions = No
        load printers = No
        dns proxy = No
        hosts allow = 10.0.1.51, 10.0.1.52, 10.0.1.53, 10.0.2.51

[usera]
        comment = usera
        path = /mnt/users/usera
        valid users = usera
        read only = No

[userb]
        comment = userb
        path = /mnt/users/userb
        valid users = userb
        read only = No
        wide links = Yes

[public]
        comment = public
        path = /mnt/users/public
        force user = userb
        read only = No
        wide links = Yes
```


----------



## SirDice (Apr 17, 2014)

oliver@ said:
			
		

> I tried upgrading from my Samba 3 set up to Samba 4.1 - I do not need als those shiny AD-Features, I just need to mount the shares on two Windows 7 systems.


In that case I would stick to Samba 3.6. Samba 4.x is really only interesting if you want to set up active directory.


----------



## oliver@ (Apr 17, 2014)

Yeah, but there will come the time where 3.6 will be deprecated and later removed. Don't you think so? And then I'm anyway forced to use 4 or whatever is out then.


----------



## trh411 (Apr 17, 2014)

Have you searched the Forums? I seem to recall others reporting this issue, but I did not follow closely enough to know whether or not a solution was found. This one in particular popped up from a quick search: Iffy Samba 4.1 performance on FreeBSD 10.0-RELEASE. There may be others as well.


----------



## oliver@ (Apr 17, 2014)

Yeah saw this posting earlier but forgott about it  :stud 

```
max protocol = NT1
```
 seems to bring back the old Samba 3 performance - where NT1 was the default (now SMB3 is)


----------

