Linux: top sucking up 90% of CPU when running?

Jun 8, 2000
94
0
0
Hi all :)

I'm a fairly raw Linux user, with my only experience in building my own ipfilter firewall box and in doing some file manipulation in UNIX. I just dedicated an old Dell PowerEdge 1300 Dual P3 as an NWN server and "play" box, running RH 7.3. I'm learning a lot!

I was most pleased to find that I could host multiple instances of NWN and only use about 30% of each CPU. I recently (last night) configuring the box to serve as a named (DNS) caching server for my LAN as well. However, when I run top now, I find that top is eating 90% of the CPU. Could named cause this? Is it an incorrect report somehow? Below is the output of top, as well as the contents of /proc/stat taken at about the same time. Your help is appreciated! :)

1:19pm up 1 day, 15:56, 8 users, load average: 2.36, 2.24, 2.19
82 processes: 75 sleeping, 7 running, 0 zombie, 0 stopped
CPU0 states: 45.0% user, 42.3% system, 0.0% nice, 12.0% idle
CPU1 states: 22.3% user, 58.4% system, 0.0% nice, 18.2% idle
Mem: 449344K av, 435656K used, 13688K free, 0K shrd, 41688K buff
Swap: 915696K av, 292K used, 915404K free 132292K cached

2245 root 25 0 1064 1064 836 R 86.7 0.2 896:36 top
7004 tim 15 0 72824 71M 3008 S 28.6 16.2 358:41 nwserver
7009 tim 15 0 34944 34M 2788 S 19.1 7.7 247:44 nwserver
1200 root 15 0 26416 23M 4828 S 8.7 5.3 228:58 X
11990 tim 15 0 22460 21M 16156 S 7.5 4.9 0:19 kdeinit
12064 tim 16 0 1052 1052 836 R 1.7 0.2 0:00 top
1260 tim 15 0 10696 10M 9676 S 1.3 2.3 23:43 kdeinit
7477 tim 15 0 12472 12M 10884 S 1.3 2.7 0:27 kdeinit
1300 tim 15 0 636 632 512 S 0.7 0.1 13:29 autorun
1298 tim 15 0 13984 13M 11556 S 0.1 3.1 5:34 kdeinit
1 root 15 0 480 480 420 S 0.0 0.1 0:06 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 34 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU1
5 root 15 0 0 0 0 SW 0.0 0.0 0:03 kswapd

/proc/stat:

cpu 8548715 97783 7035835 13185613
cpu0 4265722 49147 3514369 6604735
cpu1 4282993 48636 3521466 6580878
page 694876 3660539
swap 1 117
intr 19251762 14433973 15037 0 4 4 0 7 3 1 0 0 0 356623 0 0 3747963 15 0 260650 437482 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disk_io: (8,0):(444006,73334,1388560,370672,7321052)
ctxt 66508844
btime 1035508996
processes 12094
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
how long are you leaving top running? i notice right after i run top, it sucks up a ton of cpu, then it settles down after a few seconds and stabilizes to under 10% cpu (on a p233)
 
Jun 8, 2000
94
0
0
ah ha!! I just figured it out, with your aid, BBF. :)

I checked the details of the top PID. The offending PID was 2245 and had been running for quite some time (under root, as well). I killed it, and ran top again and lo! Using less than 1% of CPU again.

Thanks, BBF. The "how long you letting it run" suggestion pointed me in the right direction.

-DSP