OpenWrt Forum Archive

Topic: WR703N very slow data transfer with USB

The content of this topic has been archived on 9 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,
the last few days I have been playing around with my two WR703N routers. At some point I realized that the data transfer to the USB stick (extroot) was really slow (~500 kB/s) - compared to ~7MB/s before.

So I took my second router and started from scratch:
a) I flashed the OpenWRT squashfs-factory image,
b) setup the internet connection performed the extroot process (following http://en.code-bude.net/2013/02/16/how- … h-extroot/ )

c) Then I installed the openssh-sftp-server package.

Download rates from the internet to my PC via the router work fine (>3MB /s), but when moving files to / from the USB stick, I only get a transfer rate of ~50 kB/s, so even slower than before!
When downloading a file via wget to the router, I get the same slow download rate.

I exchanged the USB stick for a microSD card and tried the process again, but with the same result. Speedtest of the stick / µSD on the PC yield fast data rates.

Also, connecting the storage directly or with a USB hub in between did no change the transfer rate.

##Edit##
I got the same slow transfer rate, when logging in the router via SSH and copied files on the USB stick.
##

I am clueless!

Can anyone give any advice on where the error might be?
I preferred the 7MB/s read / write I had before...

Thank you in advance,
halfdome

(Last edited by halfdome on 16 Mar 2014, 18:52)

Connect to your router via ssh and run "top" while copying a big file.

Running "top" during a download shows the log attached below.
I don't see any overload for the processor.

On a side note: When copying files during the extrom process from the internal storage to the USB stick, the speed was fast. So the slowdown must occur after that.

Could the removed "ppp*" packages cause the slowing down? They are removed prior to the extrom process.

#########
Mem: 28044K used, 1168K free, 0K shrd, 5872K buff, 7916K cached
CPU:   0% usr   1% sys   0% nic   0% idle  97% io   0% irq   0% sirq
Load average: 1.26 0.37 0.16 2/48 2036
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
2011  1903 root     R     1500   5%   1% top
1241     1 root     S     1428   5%   0% hostapd -P /var/run/wifi-phy0.pid -B
2036  2014 root     R     1508   5%   0% wget http://downloads.openwrt.org/att
2013  1728 root     S     1216   4%   0% /usr/sbin/dropbear -P /var/run/dropbe
    7     2 root     SW       0   0%   0% [kworker/u:1]
    3     2 root     SW       0   0%   0% [ksoftirqd/0]
  632     1 root     S     1532   5%   0% /sbin/netifd
1903  1902 root     S     1508   5%   0% -ash
  616     1 root     S     1508   5%   0% /sbin/syslogd -C16
1401   632 root     S     1508   5%   0% udhcpc -p /var/run/udhcpc-wlan0-1.pid
    1     0 root     S     1504   5%   0% init
2014  2013 root     S     1504   5%   0% -ash
  500     1 root     S     1504   5%   0% init
1793     1 root     S     1500   5%   0% /usr/sbin/ntpd -n -p 0.openwrt.pool.n
1182     1 root     S     1500   5%   0% /sbin/watchdog -t 5 /dev/watchdog
  618     1 root     S     1488   5%   0% /sbin/klogd
1340     1 root     S     1428   5%   0% wpa_supplicant -B -P /var/run/wifi-wl
1902  1728 root     S     1244   4%   0% /usr/sbin/dropbear -P /var/run/dropbe
1746     1 root     S     1152   4%   0% /usr/sbin/uhttpd -f -h /www -r OpenWr
^C728     1 root     S     1152   4%   0% /usr/sbin/dropbear -P /var/run/dropbe

Well, your CPU load for I/O is at 97%. But hard to guess a good reason.

I have made a connector for the serial port on both routers and one also has a connector for the I2C contacts. But the devices have worked with this modification before, so I doubt this has anything to do with it.

Is there a small program / command to download a file from a known network address?
Then I would test the download speed for writing a file to the attached USB storage prior to the extroot process.

(Last edited by halfdome on 18 Mar 2014, 09:56)

There is wget for downloading from http-servers, or you could use netcat (nc) for direct communication with another netcat server. You could also pipe your download straight to /dev/null to check the performance of the download without any filesystem-IO.

I recall dimly that after having installed the necessary packages for the extroot process there was not enough space left for wget. Any smaller program or one already included in the standard Openwrt firmware?

a simple wget IS included in busybox afaik...

Have you made any progress in tracking down the issue?

I might have a related problem here - using the WR703N to extend an existing network:

I use the internal wifi-hardware as in AP mode and have an USB-Wifi-Stick attached and
configured as a client (STA) for an AVM FritzBox 7390. Since this is a LAN,  I just use plain
IP forwarding between both interfaces. (no nat, iptables, etc.)

The fritzbox and the wr703n are approx. 18m apart from each other, the fritzbox
mounted in an uninsulated attic and the tp-link behind a window at the same height.
So there is line of sight with just a roofing tile inbetween.

As long as there is only moderate traffic (surfing some websites) I experience
no problems. However, when I try to transfer larger files, I experience a big lag
on the client device/uplink. Ping latency increases from 2ms to over 2000ms and more
with the link speed going down from over 60something MBit/s to a max. of 6.5Mbit/s

btw:
top shows 0% io when transferring larger amounts of data between the networks.


Signal level on the uplink is around 60dBm to 70dBm  and of course the AP is at least
5 channels apart from the uplink-channel.

I already tried different USB-Wifi-Adapters (tp-link 722/ath9k_htc and logilink wl0084b/rt5370)
with the same result. So apparently it is not a matter of the wifi-driver-kernel-module.

On the other hand, when using just the internal device with AP and STA on the same channel,
I get slow but constant throughput with a latency on the uplink between 140ms and 800ms.


My guess is, that there is some issue with the USB-support on this device!

Any idea, why the datarate drops so significantly when transfering larger files?

What do you people suggest??


System is up to date!
(Linux OpenWrt 3.10.34 #1 Thu Apr 10 07:46:15 UTC 2014 mips GNU/Linux)

(Last edited by wr703n on 10 Apr 2014, 21:14)

halfdome wrote:

Hello,
the last few days I have been playing around with my two WR703N routers. At some point I realized that the data transfer to the USB stick (extroot) was really slow (~500 kB/s) - compared to ~7MB/s before.

<...>


http://wiki.openwrt.org/toh/tp-link/tl- … usb-serial

:-)

I'm well aware of that. But how does it relate to the issue with USB2.0 devices (Wifi and Storage devices)?

The discussion might have continued from here.