PDA

Bekijk de volledige versie : Want to instantly get a 15% performance boost?



kfurge
12-03-2007, 02:05
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.

LeperKing
12-03-2007, 08:10
Well done KC! Great work!

LK

Fatboysec
13-03-2007, 20:05
Is this a switch I have to execute once or do I have to add this to the rc.local file?

Thanks,

Bart

kfurge
13-03-2007, 20:31
Is this a switch I have to execute once or do I have to add this to the rc.local file?

It must be executed after every reset. So the best place to do it is in rc.local.

- K.C.

sollie
14-03-2007, 18:39
Did it, thanks.

Sollie.

fireflash
15-03-2007, 22:45
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....

back2basic
15-03-2007, 23:22
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....

sudo bash --to get a root shell :)

then

echo "interrupt=no" > /proc/miscio/power_enable_config

gratitude182
17-03-2007, 11:01
are there any disadvantages for the box if i do that?

grat182

kfurge
17-03-2007, 14:02
are there any disadvantages for the box if i do that?

grat182

Absolutely not.

- K.C.

gratitude182
17-03-2007, 14:41
nice to hear :-)

thanks again kfurge!

Elect
17-03-2007, 15:28
Any ideas if it's also for the 500g (deluxe) versions?

kfurge
18-03-2007, 02:27
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.

fireflash
21-03-2007, 23:13
sudo bash --to get a root shell :)

then

echo "interrupt=no" > /proc/miscio/power_enable_config

Sometimes it's the simplest things. :)

Thanks, works great! Fired up TOP right after issuing the command and watched the load average take a nose dive. I'm sure our little router's processors thank us for doing this :)

Magnus
22-03-2007, 12:30
Hi,
where can I watch at the performance?
On my router is no top command. Is there anything else ??

-Magnus

F3ar0n
22-03-2007, 21:02
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

mumsoft
22-03-2007, 21:40
Hi,
where can I watch at the performance?
On my router is no top command. Is there anything else ??

-Magnus

Ok, if I telnet to the router and login as root, there is no Top. But if I login as marc, that will give me all the programs I have installed, and Top is there. But I installed KFurge's image and followed his instructions to personalize the router.
I am not sure, but I bet that Top is amongst the new Busybox commands.

Correct me if I am wrong

Marc

kfurge
23-03-2007, 02:29
Ok, if I telnet to the router and login as root, there is no Top. But if I login as marc, that will give me all the programs I have installed, and Top is there. But I installed KFurge's image and followed his instructions to personalize the router.
I am not sure, but I bet that Top is amongst the new Busybox commands.


Yest, top is part of the upgraded optware busybox. Regarding your problem, you probably don't have /opt/bin in your $PATH when when logged in as root.

- K.C.

kfurge
23-03-2007, 02:33
Wow this worked amazing

I have to say a big thankyou to kfurge, d3viant and everyone on these boards.

Glad you hung in there. I've got another one for you... In addition to the gpio trick, my box is running at 300MHz now... It used to run at 264Mhz.

I want to do a little more testing before turning this trick out into the wild, but google can unlock all of the secrets if you're brave enough.

- K.C.

back2basic
23-03-2007, 11:03
Glad you hung in there. I've got another one for you... In addition to the gpio trick, my box is running at 300MHz now... It used to run at 264Mhz.

I want to do a little more testing before turning this trick out into the wild, but google can unlock all of the secrets if you're brave enough.

- K.C.

Hi,
Have been googling for over 2hours but didn't find anything :(
can you please post the link or pm it to mo ?

Do you know if this also works on openwrt

Grtzz
Ronnie.

Oleg
23-03-2007, 11:49
Guys, running @300MHz without a heatsink on the CPU is not recommended...

kfurge
23-03-2007, 23:32
Guys, running @300MHz without a heatsink on the CPU is not recommended...

Yeah, I know. That's why I'm planning on taking some thermal measurements before and after prior before posting. The how-to won't come without a recommendation.

- K.C.

BrianKDav
13-05-2007, 08:07
Just installed the ksoftirqd fix. It makes a big difference to my system. My two mapped Samba drives no longer take forever to respond. Another headache gone thanks to kfurge and the rest of you.

Thank you!

--Brian :D

batmanone
22-05-2007, 09:52
I installed the ksoftirqd fix as well, this seems also solve the ftp problem that I facing before. Before apply the fix, when ftp from Internet to the box, the ftp connection will lost at about 250 to 300MB of file transfer, and I needed to wait for at least one hour before I can login the box through ftp again.

After apply the ksoftirqd fix, I have try 3 files which both > 1GB, both can transfer successfully.

Again, thanks KC for your great effort!!!:)

Fullback
06-08-2007, 21:57
Dude that worked great... Thank you so much!

kfurge
10-08-2007, 00:36
Dude that worked great... Thank you so much!

You bet.

- K.C.

tiexano
14-10-2007, 18:51
At the end of the rc.local file before fi.

Am I doing it right?

kfurge
16-10-2007, 02:04
At the end of the rc.local file before fi.



The exact location is not critical, but mine is within the "rc.local.done" if statement so it only runs once at startup.

- K.C.

exbliss
18-03-2008, 08:52
Hi K.C. -

Just wondering, if this is still applicable to your WL700gE_kc_1078_02.nas firmware?

Is it already in there? But i dont seem to see it in the rc.local file.

I think A 15% performance gain is a lot specially if mldonky tops up to 90%.

Thanks,
Lloyd:D

LeperKing
18-03-2008, 14:27
It's already there. http://wl700g.homelinux.net/drupal/?q=node/138

LK

like1god
13-03-2009, 15:18
hy i have a wl500gp v1 ,oleg`s 1.9.2.7-10
it work`s perfectly. no hdd atached for the moment

but..

when i start my download from internet it goes 5.8 mb .maxim (i have a 10mb band)
The problem is when i`m downloading the ksoftirqd_CPU0 uses the cpu 100%
and if i enter the 192.168.1.1 to aces my roter..i have a big lag...sometimes even the page is not displyed corectly.

somthing i noticed ..i have to pc wired atached to my wl 500gp and if i download somthing from one pc to another(both top configurations) i have the 6mb 6.5 max transfer. and i know that this is the half speed normaly it must be 10 12 mb no? 100/8=12.5

i ve tried ""echo "interrupt=no" > /proc/miscio/power_enable_config"" i found in the "how to speed up 15 %" thread..but i ve got


[admin@gtm /proc]$ echo "interrupt=no" > /proc/miscio/power_enable_config
-sh: cannot create /proc/miscio/power_enable_config: Directory nonexistent

can someone help me to ...calm down the ksoftirqd_CPU0 ..?
Edit/Delete Message