# Samba transfer on gentoo machine on zfs raidz1 only 25Mb/s

## lolicatgrill

Hello,

I installed gentoo on my machine as a fileserver and I have zfsonlinux with raidz1 drives and samba installed.

I tried transferring about 1.4TB worth of files from my windows machine to my gentoo machine and it took me about 19 hours to transfer it all because the speeds were roughly 25Mb/s

I tried iperf and it seems my network is fine since it's routed via my gigabit router (asus n66u)

```
-----------------------------------------------------------

Server listening on 5201

-----------------------------------------------------------

Accepted connection from 192.168.2.1, port 57034

[  5] local 192.168.2.42 port 5201 connected to 192.168.2.1 port 57035

[ ID] Interval           Transfer     Bandwidth

[  5]   0.00-1.00   sec   112 MBytes   940 Mbits/sec

[  5]   1.00-2.00   sec   112 MBytes   942 Mbits/sec

[  5]   2.00-3.00   sec   112 MBytes   942 Mbits/sec

[  5]   3.00-4.00   sec   112 MBytes   942 Mbits/sec

[  5]   4.00-5.00   sec   112 MBytes   942 Mbits/sec

[  5]   5.00-6.00   sec   112 MBytes   942 Mbits/sec

[  5]   6.00-7.00   sec   112 MBytes   942 Mbits/sec

[  5]   7.00-8.00   sec   112 MBytes   942 Mbits/sec

[  5]   8.00-9.00   sec   112 MBytes   942 Mbits/sec

[  5]   9.00-10.00  sec   112 MBytes   942 Mbits/sec

[  5]  10.00-10.00  sec   367 KBytes   926 Mbits/sec

- - - - - - - - - - - - - - - - - - - - - - - - -

[ ID] Interval           Transfer     Bandwidth

[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec                  sender

[  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec                  receiver

-----------------------------------------------------------

```

I tried cheking my zfs spped

```
# dd if=/dev/zero of=/tank/testfile.out bs=1M count=10000

10000+0 records in

10000+0 records out

10485760000 bytes (10 GB) copied, 23.3102 s, 450 MB/s

```

Any reason why I only get 25Mb/s transfer?

----------

## bbgermany

Hi,

please post your smb.conf

greets bb

----------

## lolicatgrill

cat /etc/samba/smb.conf | grep -v '^#'

```

[global]

workgroup = RACAILUM

server string = Samba Server %v

printcap name = cups

printing = cups

load printers = yes

log file = /var/log/samba/log.%m

max log size = 50

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

interfaces = eno1

bind interfaces only = yes

hosts allow = 192.168.2.1

hosts deny = 0.0.0.0/0

security = user

guest ok = yes

[print$]

comment = Printer Drivers

path = /etc/samba/printer ## # This path holds the driver structure

guest ok = yes

browseable = yes

read only = yes

write list = root

printer admin = root

[printers]

comment = All Printers

browseable = no

printable = yes

writable = no

public = yes

guest ok = yes

path = /var/spool/samba

printer admin = root

[public]

comment = Public Files

browseable = yes

public = yes

create mode = 0766

guest ok = yes

path =

[Argama]

   comment = Argama files

   path = tank

   browseable = yes

   guest ok = yes

   writable = yes

   null passwords = true

   wide links = yes

   unix extensions = no

   read only = no

   force user = nobody

   force group = nogroup

```

----------

## bbgermany

Hi,

change the following line:

```

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

```

to

```

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536

```

and restart samba. Then try again.

greets bb

----------

## lolicatgrill

It worked now it's transferring at 100Mb/s! thanks!

----------

