Well done KC! Great work!
LK
Then issue the following command:
echo "interrupt=no" > /proc/miscio/power_enable_config
I finally found out what is causing ksoftirqd so much grief! It is the gpio driver. Turns out the +5V power on/off gpio is configured as an output (OK) and also an interrupt source (not OK). This results in a gpio interrupt storm.
The only thing that keeps the problem from being *much* worse is that the gpio driver disables gpio interrupts while it applies a 10mS debounce period to the input pins. This action limits the total number of actual interrupts to only 100 / sec which is not so bad.
The performance hit comes from the way the debounce actually happens. In the driver, input pins are debounced by continuously rescheduling a bottom half tasklet until the 10mS debounce period has expired. Ksoftirqd was being charged with this CPU time. The sharing of time slices between this tasklet and other runnable, cpu bound, processes resulted in the degraded performance.
Here's the before and after execution time of a cpu intensive task:
# time /bin/tar tvzf junk.tgz > /opt/tmp/file.txt
real 4m 40.36s
user 3m 54.46s
sys 0m 3.02s
# echo "interrupt=no" > /proc/miscio/power_enable_config
# time /bin/tar tvzf junk.tgz > /opt/tmp/file.txt
real 4m 0.15s
user 3m 54.14s
sys 0m 3.04s
See how the real time went from 4:40.36 to 4:00.15? That's 16.7% faster!
One final thing, here's the new load average of my box:
load average: 0.14, 0.03, 0.01 ;-)
- K.C.
Last edited by kfurge; 12-03-2007 at 02:07.
Well done KC! Great work!
LK
Is this a switch I have to execute once or do I have to add this to the rc.local file?
Thanks,
Bart
Did it, thanks.
Sollie.
I tried issuing the command and got:
[kenn@WL700gE /]$ echo "interrupt=no" > /proc/miscio/power_enable_config
-bash: /proc/miscio/power_enable_config: Permission denied
I'm stumped....
Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net
My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)
are there any disadvantages for the box if i do that?
grat182
nice to hear :-)
thanks again kfurge!
Any ideas if it's also for the 500g (deluxe) versions?
Dunno. The thing to look for is whether or not the /proc/miscio/power_enable is configured as an output with interrupts enabled and your average inactive cpu load is 1.00. If so, then the countermeasure will probably help.
To test, type 'cat /proc/miscio/power_enable_config'.
These two lines matter:
direction=out
interrupt=no
If interrupt=yes, change it as posted.
- K.C.
Hi,
where can I watch at the performance?
On my router is no top command. Is there anything else ??
-Magnus
Wow this worked amazing
I have to say a big thankyou to kfurge, d3viant and everyone on these boards. I never used unix before at all and spent 13 hours total, but I got it running great. I successfully installed mt-daapd and have itunes share running AMAZING on the router. AND IT SUPPORTS MY ID3 tagging for once!
Just a big thank you for everyone who contributed to this project. I must I'm feeling a lot better being able to have a router actually capable of running the apps it's suppose too. (I'll stick with utorrent on the pc instead of the router since I've heard problems with reserf and dl speeds being horribly slow_
I simply was able to add the echo into my rc.local and it's running a good bit faster. If you've down the firmware hack, you must be sure to vi or nano ur rc.local and add this in.
Also, is it possible that I'm ftp'ing locally faster? I was ftp around 3000 kbs, now it's around 3600? Anyways, thanks kfurg and everyone..This is well worth it unlike my first impressions. I'm glad I came across this site. I was about to ebay it