# usb 3.0 slow read speed



## yhq_34 (Dec 20, 2018)

I am installing FreeBSD on the USB, and use netatalk to share folder with Mac. and I found strange was write speed can reach 100Mb/s and read speed was just 2-10mbps. that's weird. what's the problem?

use controller:

```
xhci0: <Intel Panther Point USB 3.0 controller> mem 0xd4720000-0xd472ffff at device 20.0 on pci0
```


----------



## yhq_34 (Dec 26, 2018)

My FreeBSD computer didn't connect to internet, just LAN with Mac, does that effect read speed??


----------



## SirDice (Dec 27, 2018)

yhq_34 said:


> and I found strange was write speed can reach 100Mb/s and read speed was just 2-10mbps.


How are you measuring this? And what exactly is the direction? From the USB stick to a network share? Or vise versa? How is the read/write speed locally (local disk), and using only the USB storage? What is the rating of the USB stick (not all sticks have the same specifications)? How are the network speeds (copy locally to/from network share)?


----------



## yhq_34 (Dec 27, 2018)

It reflect from afp share, I use my mac copy docs to freebsd the speed will be low.
USB stick was using for freebsd os system files. and I have another HDD for data share to my mac.
Data was write to HDD, the HDD was brand new seagate that I just bought.  network was 1G/bps


----------



## yhq_34 (Jan 1, 2019)

I found when I change back to 11.2, afp read speed was back to normal, so I thought it was 12 version's netatalk 3 problem.


----------



## SirDice (Jan 2, 2019)

yhq_34 said:


> so I thought it was 12 version's netatalk 3 problem.


All versions of FreeBSD use the same ports tree and therefor have the same applications and versions available to them. So your netatalk is exactly the same version on 11.2 and 12.0.


----------



## yhq_34 (Jan 2, 2019)

Sorry, not netatalk 3 problem, should be version12 change some sysctl network parameters cause it. I changed below code can be faster, but not maximum. Only change to 11.2 it will become normal speed.

```
tcprcvbuf = number (G)
tcpsndbuf = number (G)
```


----------



## SirDice (Jan 2, 2019)

yhq_34 said:


> should be version12 change some sysctl network parameters cause it.


FreeBSD 12.0 definitely had some network changes so that's certainly a possibility. What network card do you have? How is it detected?


----------



## yhq_34 (Jan 2, 2019)

should be Intel 82579LM;
freebsd:

```
em0: <Intel(R) PRO/1000 Network Connection 7.6.1-k>
```


----------

