NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: top(1) behavior



On Fri, Aug 11, 2023 at 2:01 AM Martin Husemann <martin%duskware.de@localhost> wrote:
>
> On Thu, Aug 10, 2023 at 02:13:12PM -0700, Kevin Bowling wrote:
> > When running something heavy yet ephemeral like a parallel make, I can
> > see expected CPU usage in the summary or per-cpu view.  However, I
> > rarely see the process(es) consuming the CPU momentarily during the
> > update intervals reflected accordingly in the per process view below.
> > I find the behavior somewhat surprising compared to FreeBSD top(1) and
> > am wondering what the difference is.
>
> You mean you often don't see the process with STATE CPU/0 (or some other
> cpu)?

Hi Martin,

A real example is doing a -j 8 kernel build.  Up in the top of top(1),
I see global CPU usage in the high 90%.  Down in the process list, I
see a few processes in the 1-10% range that do not add up to 800%.  I
see some of the cc1 processes with 0% WCPU%/CPU%.

> Maybe FreeBSD uses a different default sort - you could try experimenting
> if you get similar display with something like "top -o ..." and various
> sort fields.

I checked these fields out, sorting by cpu for instance and see the same deal.

I checked FreeBSD and Linux and they don't get it perfect.. the former
seems to have slightly better accounting of momentary processes down
in the process list somehow though.

> Martin


Home | Main Index | Thread Index | Old Index