1 (edited by robnitro 2011-02-11 00:43:42)

Topic: Good USB drive speed tweak

On my g300nh I was getting horrid results on writes with time dd tests, around 8 MB/sec.

I found a tweak that helped it go to 19 MB/sec after looking at some linux forums.

You can add this line to /etc/sysctl.conf and reboot or run sysctl -p.
/sys/block/sda/device/max_sectors=1024

or if you prefer to put it in a startup script or run it one time.
echo 1024 > /sys/block/sda/device/max_sectors

Re: Good USB drive speed tweak

Nice trick! Got my wr1043nd transfer speed from 11 MB/s to 13.5 MB/s.

Re: Good USB drive speed tweak

Great tip! Drastically improved my throughput! smile

Re: Good USB drive speed tweak

Now if it could drastically increase my samba and ftp write to router usb hdd speeds.  At most I can do is max 10 MB/sec writes on g300nh despite dd write doing 19!

5 (edited by lessthanjoey 2011-02-11 21:08:17)

Re: Good USB drive speed tweak

Interesting. I can get ~31MB/sec both read+write on my wndr3700. Samba is still limited to about 5.5MB/sec write and 7MB/sec read though sad

EDIT: FTP has similar speeds (if anything, slightly slower) to Samba.

Re: Good USB drive speed tweak

Thanks, this doubles write performance. See results for "Seagate Free Agent Desktop, 250GB" in http://wiki.openwrt.org/inbox/benchmark.usb

But I notice that going over 30MB/s transfer speeds loads the CPU to 45%
I think samba and ftp are limited by CPU. I download a 100MB file over CIFS with around 5MB/s and top show the following CPU load:

8% usr  43% sys   0% nic   0% idle  26% io   0% irq  21% sirq

See my bonnie++ results with and without the max_sectors (use bon_csv2html to convert csv to nice html):

1.96,1.96,felis-way,1,1362551860,64M,,,,15895,11,9900,25,,,26373,39,94.0,16,,,,,,,,,,,,,,,,,,,805ms,285ms,,101ms,554ms,,,,,,
1.96,1.96,felis-way,1,1362552675,64M,,,,31864,67,12645,34,,,33142,45,117.7,19,,,,,,,,,,,,,,,,,,,27761us,197ms,,25956us,532ms,,,,,,

Re: Good USB drive speed tweak

Really hoping to get some openwrt supported routers with usb 3.0 ports soon.

Re: Good USB drive speed tweak

tului wrote:

Really hoping to get some openwrt supported routers with usb 3.0 ports soon.

As I wrote earlier, the transfer speeds are limited to CPU, not data bus. And you can see IO speed of the only USB 3.0 router in the wiki page is not higher than 2.0
With a faster CPU and more memory things may change though.

Re: Good USB drive speed tweak

Some routers with a tablet OMAP 5xxx CPU and USB 3.0 then :-P

Re: Good USB drive speed tweak

tului wrote:

Some routers with a tablet OMAP 5xxx CPU and USB 3.0 then :-P

Or a Snapdragon 600, any of the high end SoCs out now. I'd really like to see an beaglebone or raspberry Pi type device(with a bit beefier CPU) and a built in 4 or 5 port switch that supports VLAN and jumbo packets.

Kickstarter anyone?