Portal Home > Knowledgebase > Articles Database > High %ni in top


High %ni in top




Posted by iUnknown, 04-14-2009, 12:50 PM
Hello, When I run the top command on my server, my output is as follows: ===================================== Tasks: 515 total, 50 running, 363 sleeping, 1 stopped, 101 zombie Cpu(s): 1.1%us, 2.6%sy, 94.3%ni, 0.0%id, 0.0%wa, 0.3%hi, 1.7%si, 0.0%st Mem: 1026792k total, 976680k used, 50112k free, 27548k buffers Swap: 2096472k total, 466248k used, 1630224k free, 251920k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 400 nobody 17 1 48592 18m 6956 R 20 1.9 0:17.65 lsphp5 6925 nobody 17 1 50008 17m 4048 R 20 1.7 0:06.15 lsphp5 13819 nobody 17 1 47900 14m 3372 R 17 1.4 0:04.23 lsphp5 24392 nobody 17 1 51084 16m 4304 S 11 1.6 0:13.07 lsphp5 3339 nobody 16 1 50620 17m 3876 D 11 1.7 0:08.43 lsphp5 358 nobody 17 1 49260 17m 5352 R 10 1.8 0:13.00 lsphp5 4059 nobody 17 1 47824 15m 4688 S 9 1.6 0:08.23 lsphp5 26979 nobody 16 1 51220 19m 5392 R 9 1.9 0:12.04 lsphp5 11864 nobody 17 1 48592 15m 4376 R 8 1.6 0:03.76 lsphp5 381 nobody 17 1 52100 19m 4576 S 7 1.9 0:09.34 lsphp5 4056 nobody 17 1 48564 15m 3932 R 7 1.5 0:06.58 lsphp5 12838 nobody 17 1 48856 16m 4088 R 7 1.6 0:06.11 lsphp5 6924 nobody 17 1 51060 15m 4188 R 6 1.6 0:04.36 lsphp5 14343 nobody 17 1 47736 13m 2712 R 6 1.3 0:00.18 lsphp5 11848 nobody 17 1 48580 16m 5268 S 5 1.7 0:06.18 lsphp5 11862 nobody 17 1 48124 14m 3848 R 5 1.5 0:04.23 lsphp5 14293 nobody 17 1 47872 13m 3020 S 5 1.4 0:00.84 lsphp5 ===================================== lsphp is my webserver (litespeed). The sleeping processes are my SHOUTcast servers. The thing I am concerned about is the "94.3%ni". This is slowing down my server completely and I am not too sure of what it is. Can anyone shed any light on this? Thanks very much.

Posted by The Universes, 04-14-2009, 12:56 PM
ni is the %cpu used by processes that have been set to a different scheduling priority level. (using nice or renice). If you look at your lsphp5 processes, in the NI column, its set to 1, which makes it 1 step below the default scheduling priority. Negative values means higher, and positive means lower scheduling priority. Basically, lsphp5 is eating up your CPU.

Posted by iUnknown, 04-14-2009, 12:59 PM
I've stopped litespeed and now it's gone back down. Litespeed isn't starting now. Looks like litespeed doesn't want to behave itself.

Posted by mchristen85, 04-14-2009, 01:00 PM
You are overloading your server. Both %us and %ni represent processes running in userland, the only difference is %ni reports on processes that have been 'niced' while %us are non niced processed. So if your %us + %ni is really high you need more CPU power. You're also hitting your swap pretty hard, you definitely need more RAM. What are the specs on your server?

Posted by iUnknown, 04-14-2009, 01:23 PM
This is resolved now, the litespeed software just got out control. It seems to have mostly fixed myself although I used renice to change the priority back to 0 because it was being displayed as 1.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
SEMOWEB VPS Down (Views: 724)

Language: