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?
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.
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