Re: unusual cpu usage

Andrej Presern (andrejp@luz.fe.uni-lj.si)
Sun, 22 Jun 1997 15:33:50 +0200


Rogier Wolff wrote:
>
> Andrej Presern wrote:
> >
> > Rogier Wolff wrote:
> > >
> > > Andrej Presern wrote:
> > > >
> > > > My system is showing some weird cpu usage here.
> > > > Here are the stats:
> > > >
> > > > Information for Soda
> > > > Load: 0.53 0.54 0.54
> > > > CPU: 7.7%U 5.7%S 86.6%I
> > >
> > > Your system is serving interrupts most of the time. Find out which one
> > > by looking in /proc/interrupts, and see which counter goes up fastest.
> > > (ignore the first (timer)).
> >
> > Hm. They all seem to stand still, only the timer goes up. May it
> > have something to do with the pc-speaker sound driver since that
> > one fiddles around with irq 0?
>
> Hmmm. Are you sure? Maybe you're right. It could be that the pc-speaker
> driver turns the irq up to "a lot". You should see around 100
> interrupts per second from irq0 in normal situations.
>
> Try "grep \ 0: /proc/interrupts;sleep 10;grep \ 0: /proc/interrupts"
>
> That should give you a difference of about 1000, 10 seconds times 100
> per second. My ppro takes 40 ms to execute the "grep" commands, so I'm
> seeing 1004 ticks difference.....

[andrejp@soda ~]$ grep \ 0: /proc/interrupts;sleep 10;grep \ 0:
/proc/interrupts
0: 1033368 timer
0: 1034372 timer
[andrejp@soda ~]$ uptime
3:18pm up 2:52, 2 users, load average: 0.30, 0.27, 0.20

The timer seems normal, load stays at 0.20+ all the time.

> > Also I found that restarting X helps cutting the load down to
> > normal. Hmmm.
>
> Maybe somehting, running under X that kept a pc-speaker device open.
> I've never used that, so don't consider me an expert....

Hmm. Now that you mentioned it, I remembered that I also added
a few things to the startup function of the afterstep window
manager.

[2 minutes later]

I restarted afterstep and the load goes down. So it seems like a
problem related to afterstep (when I restart it it doesn't start
any programs, just rehashes itself). The stats should show correct
values anyway.

Now I disabled sounds in afterstep.. we'll see if it was related
to pcsp anyway. Odd enough, it doesn't happen every time I start
X so I'm not really able to reproduce it whenever I want but have
to wait for it to happen again instead.

Andrej