1- Local copy: HDD plugged to USB3.0 port on my PC
Remote copy: HDD plugged to USB3.0 port on my wrt3200acm and accessing it via samba share from my PC which is connected with lan cable to the router
2- You mean "usbutils"? "usb-utils is not available to install on openwrt repo, if you mean "usbutils", then I suppose you may want to see "lsusb" output:
lsusb
Bus 003 Device 002: ID 0bc2:3322 Seagate RSS LLC SRD0NF2 [Expansion Desktop Drive]
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
3- The router has 2 ports, esata/usb (usb port 1) and usb3.0 (usb port 2, with traditional blue connector), I am plugging the HDD to usb port 2
4- No idea about uboot, what could I check? I am a bit lost with this point
As always triple check before enter with dd.... we all know what it stands for.....
Also.... The size of your disk ..... Not sure but the last few times I upgraded to the cutting edge it TB..... my PC had dramas let alone a router......
We need to confirm that it's all good regarding that too....
Just to make sure you are not barking up the wrong tree, I would mirror @anon50098793's suggestion: You should do a "proper" speed test on your disk, not going through samba and a network connection.
samba and other services will always be a bottleneck due to the CPU overhead on network connections. I have personally seen limitations like you describe (in the lower 20 MB/s), even on quite capable SoCs with a disk directly attached to SATA.
On the shell, cd to where you mounted your disk and do
# time dd if=/dev/zero of=tempfile bs=1M count=1024
This will write a 1 GB file to disk, divide 1024 by the resulting time in seconds and you got your MB/s for writing. After that you can test your read speed in a similar manner with
# time dd if=tempfile of=/dev/null bs=1M count=1024
(after that you can delete the tempfile file again). It might well very turn out that your USB connection is actually not the limiting factor.
root@OpenWrt:~# lsusb -t
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=orion-ehci/1p, 480M
You are totally right, it is an excellent approach, here are the measures:
root@OpenWrt:/mnt/sda4# time dd if=/dev/zero of=tempfile bs=1M count=1024
1024+0 records in
1024+0 records out
real 0m 26.26s
user 0m 0.00s
sys 0m 4.01s
root@OpenWrt:/mnt/sda4# time dd if=tempfile of=/dev/null bs=1M count=1024
1024+0 records in
1024+0 records out
real 0m 9.16s
user 0m 0.01s
sys 0m 1.15
So now it gets strange, because my calculator says 38.99MBps write speed and 111.79MBps read speed, why should be only the write speed lower?
It seems to be already added, here are the outputs:
root@OpenWrt:~# opkg install kmod-usb3
Package kmod-usb3 (4.14.95-1) installed in root is up to date.
root@OpenWrt:~# insmod xhci-hcd
Failed to find xhci-hcd. Maybe it is a built in module ?
root@OpenWrt:~# opkg install kmod-usb3
Package kmod-usb3 (4.14.95-1) installed in root is up to date.
root@OpenWrt:~# insmod xhci-hcd
Failed to find xhci-hcd. Maybe it is a built in module ?
With lsmod uas is listed:
uas 16384 0
I remember to install kmod-usb-storage, kmod-usb-storage-uas and kmod-usb3 I am not sure but maybe also usbutils, it does not work anyway
It seems that kernel is not loading the uas module right?
And it seems that it archieves 100+ MBps speeds on write and read on ntfs drives, so there is hope of hardware support, let's see if bug report hits the issue.
I got some news! I tried to copy 3 files at the same time to see total capacity and guess what? Copying 3 files gives me 25MBps each, and copying 4 files gives me 18MBps each so it seems that total capacity may be around 75MBps more or less, so now I guess that the issue may be with samba, because it don't use full speed when you test copying one big file, 75MBps it a lot more reasonable speed considering that the disk is capable of 100MBps (perhaps there is a 25% of samba overhead)
Any ideas of what could be the cause of that issue? The test was made copying files from samba share to my PC
Well its very possible that samba is the only problem. Try to use a higher level tool to test the actual limits of the setup, using something like iperf3 between the router and another linux machine (I'm sure there are other options too).
Yup, with iperf I measure 1 gigabit speed with no problems in both sides, so the problem is samba for sure, but I am not being able to find which config is wrong
It is not wireless, my PC goes with LAN cable to the router and the HDD is plugged via USB, plus the main issue now is that I cannot get 75MB/s for a single big file transfer, several parallel transfers are needed to use that BW