1
Yesterday i've flashed openwrt on my new router and configured the samba server etc., anticipating to get useful transfer speeds from the USB drive that i've connected. For testing purposes (and because my bus powered external usb3 hdd won't work) i used a ext4 formatted 8GB USB 2.0 flash drive to test the transfer speeds from the router. Below are the transfer speeds tested on the router itself via ssh:
$hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 176 MB in 2.00 seconds = 87.92 MB/sec
Timing buffered disk reads: 74 MB in 3.00 seconds = 24.65 MB/sec
$time dd count=128 bs=1M if=/dev/zero of=test.test
128+0 records in
128+0 records out
real 0m 15.60s
user 0m 0.01s
sys 0m 2.70s
~ 8.5 MB/s
These values seem to be ok, but the speeds via sftp or samba are total opposite. I've connected my laptop via ethernet-cable and wlan, both times with the same worse transfer rates. Via samba i've got 1.1 MB/s and via sftp even worse 300 kB/s, the drop is caused by the encryption but 300 kB/s are a joke. That is totally unusable, the stock firmware was 10 times faster, but i would like to keep OpenWRT on my router. Is this maybe a configuration issue?
UPDATE:
I formatted the flash drive now with ext2 and i get transfer rates about 6 MB/s, but ext2 only supports files smaller than 4GB. I will try to format the drive with ext3 or 4 without journaling.
UPDATE2:
I mounted the ext4 formatted drive with the following options and got nearly the same transfer rates as with ext2. Maybe the OpenWRT wiki entry about usb storage should be overworked.
mount -t ext4 /dev/your_mount_device /mnt/your_mount_folder/ -o rw,relatime,data=writeback,errors=remount-ro,nodev
What were your ext4 mount options? Cheap USB flash drives have very slow writes because of the erase time. – David Schwartz – 2013-06-02T10:15:55.113
mount -t ext4 /dev/sda1 /mnt/shares -o rw,sync
– klingt.net – 2013-06-02T10:26:58.733sync
?! For what possible reason would you do that?! – David Schwartz – 2013-06-02T10:29:37.007I haven't thought about it, the options are from the openwrt wiki. – klingt.net – 2013-06-02T10:34:43.260
Ok, studied the mount options a little bit and mounted the ext4 formatted flash drive now with the following options:
mount -t ext4 /dev/sda1 /mnt/8gb_rageXT/ -o rw,relatime,data=writeback,errors=remount-ro,nodev
Transfer rates seems to be the same, as with ext2. – klingt.net – 2013-06-02T11:11:41.373