top/ps CPU percentage broken on 7.1-PRERELEASE? (works with
SCHED_4BSD)
Stefan Ehmann
shoesoft at gmx.net
Sat Oct 4 06:10:47 UTC 2008
On Friday 03 October 2008 11:39:37 Jonathan Chen wrote:
> On Fri, Oct 03, 2008 at 10:03:13AM +0200, Stefan Ehmann wrote:
> > The CPU % displayed by top/ps for single processes seem to be broken
> > here.
> >
> > E.g. for a simple shell loop:
> > top starts displaying around 20% for bash. Within some seconds it
> > converges to 0%.
> >
> > ps values seem to be consistent with top.
> >
> > The value in the time column seems to be correct. On every refresh it
> > increases by 2s.
> >
> > last pid: 19353; load averages: 0.99, 0.90, 0.76 up 0+00:37:29
> > 09:07:00
> > 119 processes: 2 running, 114 sleeping, 1 stopped, 2 zombie
> > CPU: 98.5% user, 0.0% nice, 1.1% system, 0.4% interrupt, 0.0% idle
> > Mem: 376M Active, 407M Inact, 144M Wired, 47M Cache, 110M Buf, 13M Free
> > Swap: 1280M Total, 1280M Free
> >
> > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
> > 19352 stefan 1 99 0 4432K 2080K RUN 0:03 15.48% bash
> >
> > All other process are using 0% CPU.
> >
> > I did a buildworld/kernel yesterday to be sure everything is in sync. I
> > have CURRENT on a different hard disk. Haven't seen the problem there.
> > Are there any relevant fixes that weren't MFCed?
> >
> > Does anyone else see this? This is a single CPU i386 machine.
>
> Yes, my Java processes now run at 800% at times on my dual processor
> AMD64 system.
I've seen this behaviour too some time ago. Don't know if it's related to what
I see.
I recompiled my kernel with SCHED_4BSD and things work fine. So it seems to be
a SCHED_ULE issue.
More information about the freebsd-stable
mailing list