# [solved] network file transfer very slow...

## disi

I have a share on a server and cannot get beyond ~1.5MB/s transfer speed. The server has constant gigabit and the client is temperamental sometimes 100MBit and sometimes detected as 1000MBit.

server:

```
Settings for eth1:

   Supported ports: [ TP MII ]

   Supported link modes:   10baseT/Half 10baseT/Full 

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Supported pause frame use: No

   Supports auto-negotiation: Yes

   Advertised link modes:  10baseT/Half 10baseT/Full 

                           100baseT/Half 100baseT/Full 

                           1000baseT/Half 1000baseT/Full 

   Advertised pause frame use: Symmetric Receive-only

   Advertised auto-negotiation: Yes

   Link partner advertised link modes:  10baseT/Half 10baseT/Full 

                                        100baseT/Half 100baseT/Full 

                                        1000baseT/Half 1000baseT/Full 

   Link partner advertised pause frame use: Symmetric Receive-only

   Link partner advertised auto-negotiation: Yes

   Speed: 1000Mb/s

   Duplex: Full

   Port: MII

   PHYAD: 0

   Transceiver: internal

   Auto-negotiation: on

   Supports Wake-on: pumbg

   Wake-on: g

   Current message level: 0x00000033 (51)

                drv probe ifdown ifup
```

I tested scp, nfs3, nfs4 and cifs with all possible settings fior nfs, which I would prefer. Same hardware with FreeBSD setver had about 10-15MB/s with 100MBit network, so I assume it is on the server side.

With rsync between the local disks gives me ~30MB/s speeds, which is OK for me.

NIC on the server:

```
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

   Subsystem: Realtek Semiconductor Co., Ltd. TEG-ECTX Gigabit PCI-E Adapter [Trendnet]

   Kernel driver in use: r8169

   Kernel modules: r8169

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

   Subsystem: Realtek Semiconductor Co., Ltd. TEG-ECTX Gigabit PCI-E Adapter [Trendnet]

   Kernel driver in use: r8169

   Kernel modules: r8169
```

Current settings for nfs:

```
/tank1/data 192.168.0.0/24(async,no_subtree_check,rw,no_root_squash)
```

Firewall rules (I also tried insecure for unprivileged ports on nfs with no better result)

```
Chain INPUT (policy ACCEPT)

target     prot opt source               destination         

ACCEPT     all  --  anywhere             anywhere            

ACCEPT     all  --  anywhere             anywhere            

REJECT     udp  --  anywhere             anywhere             udp dpt:bootps reject-with icmp-port-unreachable

REJECT     udp  --  anywhere             anywhere             udp dpt:domain reject-with icmp-port-unreachable

DROP       tcp  --  anywhere             anywhere             tcp dpts:0:1023

DROP       udp  --  anywhere             anywhere             udp dpts:0:1023

Chain FORWARD (policy DROP)

target     prot opt source               destination         

DROP       all  --  anywhere             192.168.0.0/16      

ACCEPT     all  --  192.168.0.0/16       anywhere            

ACCEPT     all  --  anywhere             192.168.0.0/16      

Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination    
```

uname -a

```
Linux disi-disk 3.4.9-gentoo #10 SMP Wed Oct 17 21:57:23 Local time zone must be set--see zic x86_64 Intel(R) Atom(TM) CPU N550 @ 1.50GHz GenuineIntel GNU/Linux
```

I can still live with the speed, but could be better...

----------

## b0nafide

I would recommend checking the stats too (assuming eth1): 

```

# ifconfig eth1 | grep errors

# netstat -s eth1 | grep 'errors\|bad'

```

----------

## Hu

What speed do you get using discard and/or chargen?

----------

## disi

Thanks, I will update later.

//edit: if the client is also on 1000MBit, I get ~20-30MB/s

which is the speed of the controller and therefore fine...

```
netstat -s eth1 | grep 'errors\|bad' 

    0 bad segments received.

    0 packet receive errors

    0 receive buffer errors

    0 send buffer errors

```

```
ifconfig eth1 | grep errors

          RX packets:605836 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1038348 errors:0 dropped:0 overruns:0 carrier:0
```

p.s. I had to reboot the netgear switch when I came from work... this could have been the issue...   :Question: 

----------

