OpenWrt Forum Archive

Topic: Kernel 2.6 poor usb performance?

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

Hi,
I use asus wl-500gp and recently I've changed the wifi to Atheros to make transfers to my usb hdd stable (wl500gp freezes with the original broadcom). I've compiled kamikaze trunk 2.6, all went well, but the transfers through samba/ftp are at about 1.3-1.5megabyte/sec while on 2.4 with broadcom I had stable 2.2megabyte/sec (until it froze after few hundred megabytes).
I thought that newer kernel/newer code would have comparable or better performance than the old one? or am I doing something wrong?

Right now I'm compiling 2.4 with madwifi to test it...

(Last edited by madwolf on 17 Apr 2008, 05:59)

on my NFS server (wl500gP, kamikaze 7.09 2.4), i'm getting about 6-10 MB/sec when writing (drops to about 1MB/sec after 100MB), and around 1-2MB/sec when reading. haven't tried samba yet.

have you tried adding swap space to improve disc performance? i have, but it didn't change anything (as documented here in this thread that nobody replies to: http://forum.openwrt.org/viewtopic.php?id=15307)

I think that those are the limits of the processor so swap doesn't do any difference. 2.4 is much better than 2.6.
Now I have 2.2-2.3megabytes/sec over wifi.

so 2.6 is even worse in this regard?

i don't know about the processor -- system load doesn't go beyond 0.60 during those transfers. but RAM is filled up almost instantly. i think that's why getting a swap partition is recommended for improving through-put so often.

i've seen a tutorial over at oleg's forum on how to solder more ram (up to 128MB) right onto the board -- maybe that's the way to go if swap isn't working..

Buy a better router...

Hm, I've got 100% load on the processor while transferring with speed over 2megabytes/sec.

forum2008:
yep. that's the simplest solution :-) If I had known what problems will I have with this I would buy some pico/nano itx board with 1ghz processor for not much more money... but since I've got wl-500gp I'm trying to make the most of it :-)
Actually I'm looking right now at mini itx (17cmx17cm) with 800mhz proc, pci, 4xusb, wifi, lan, ide controller etc. for less than 100euros

(Last edited by madwolf on 17 Apr 2008, 20:23)

as for the 60% max load, i was talking transfers on NFS -- can't tell what samba would have looked like.

any comments on the swap issue, forum2008?

root@R-Net:/# free
              total         used         free       shared      buffers
  Mem:        30504        22592         7912            0         1704
Swap:       248996        11740       237256
Total:       279500        34332       245168

Looks like swap is working for me, over 11 megabytes in swap. However, I've got postgresql server running, lighttpd + php5, samba, pure-ftpd so they take up some memory. With samba alone swap is neraly not used at all, probably samba just doesn't need more memory. Heavy swap usage started when I've installed the postgresql server.

Do you make use of /etc/config/fstab to configure swap?

should I? I made a script in /etc/init.d which mounts my partitions and does swapon

Yes, you should.

There is already a init script (/etc/init.d/fstab) which reads /etc/config/fstab smile

Ah, I see. Well, it works both ways :-)

madwolf wrote:

Ah, I see. Well, it works both ways :-)

Yes, but

1. /etc/config/fstab and /etc/init.d/fstab is the official way
2. you don't have to reinvent the wheel over and over again

root@R-Net:/# free
              total         used         free       shared      buffers
  Mem:        30504        22592         7912            0         1704
Swap:       248996        11740       237256
Total:       279500        34332       245168

Looks like swap is working for me, over 11 megabytes in swap. However, I've got postgresql server running, lighttpd + php5, samba, pure-ftpd so they take up some memory. With samba alone swap is neraly not used at all, probably samba just doesn't need more memory. Heavy swap usage started when I've installed the postgresql server.

have you looked at memory/swap usage while you're actually transferring files to USB with samba? on my box with nfs, i noticed that after i started a transfer, RAM usage quickly went up from around 50% to 99% (which seemed to be the point where transfer rates dropped), but swap usage only went from 0 to 36kb.

1. /etc/config/fstab and /etc/init.d/fstab is the official way

/etc/config/fstab isn't recognized here, but /etc/fstab works (for manually mounting).

what does /etc/init.d/fstab have to look like to have the stuff mounted on startup? my /etc/fstab looks like this:


/dev/discs/disc0/part1  /mnt    ext3    defaults        0       0

/dev/discs/disc0/part2  none    swap    sw      0       0

madwolf wrote:

root@R-Net:/# free
              total         used         free       shared      buffers
  Mem:        30504        22592         7912            0         1704
Swap:       248996        11740       237256
Total:       279500        34332       245168

Looks like swap is working for me, over 11 megabytes in swap. However, I've got postgresql server running, lighttpd + php5, samba, pure-ftpd so they take up some memory. With samba alone swap is neraly not used at all, probably samba just doesn't need more memory. Heavy swap usage started when I've installed the postgresql server.

Yes. You have right. Database daemon take lots of space memory.
You say that PostresSQL is running fine. There is also MySQL for openwrt? I prefer MySQL because I have some php application which require mysql and I want to put on the router and I didn't found anywhere in the packages.

Thank you.

(Last edited by youth4ever on 10 Jun 2008, 17:53)

The discussion might have continued from here.