[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-users
Subject:    Re: top(1) behavior
From:       RVP <rvp () SDF ! ORG>
Date:       2023-08-13 7:14:14
Message-ID: bbe056e8-a9aa-a588-c235-69c5a5c98398 () SDF ! ORG
[Download RAW message or body]

On Sat, 12 Aug 2023, Kevin Bowling wrote:

> Here's a sample, this one is a bit better since the cc1plus processes
> stick around for a bit longer but it still shows the WCPU% not adding
> up near the global CPU stats.  I can annotate it as an image if it is
> still not clear.
>
> load averages:  6.15,  3.21,  1.67;               up 0+04:56:56
>                                                            12:37:26
> 142 threads: 2 runnable, 123 sleeping, 10 zombie, 7 on CPU
> CPU0 states: 92.6% user,  0.0% nice,  7.4% system,  0.0% interrupt,  0.0% idle
> CPU1 states: 91.6% user,  0.0% nice,  8.2% system,  0.0% interrupt,  0.2% idle
> CPU2 states: 91.6% user,  0.0% nice,  8.4% system,  0.0% interrupt,  0.0% idle
> CPU3 states: 89.4% user,  0.0% nice, 10.0% system,  0.0% interrupt,  0.6% idle
> CPU4 states: 57.9% user,  0.0% nice, 10.2% system,  0.0% interrupt, 31.9% idle
> CPU5 states: 99.8% user,  0.0% nice,  0.2% system,  0.0% interrupt,  0.0% idle
> CPU6 states: 96.2% user,  0.0% nice,  3.4% system,  0.0% interrupt,  0.4% idle
> CPU7 states: 97.0% user,  0.0% nice,  3.0% system,  0.0% interrupt,  0.0% idle
> Memory: 7213M Act, 5392K Inact, 110M Wired, 105M Exec, 5933M File, 7165M Free
> Swap: 16G Total, 16G Free / Pools: 1017M Used
>
> PID   LID USERNAME PRI STATE       TIME   WCPU    CPU NAME      COMMAND
> 1598  1598 kev009    25 CPU/5       0:26 98.03% 72.66% -         cc1plus
> 6906  6906 kev009    25 CPU/7       0:26 96.51% 71.53% -         cc1plus
> 29633 29633 kev009    25 CPU/2       0:01 64.58%  6.15% -         cc1plus
> 6016  6016 kev009    25 CPU/6       0:01 75.00%  3.66% -         cc1plus
> 5636  5636 kev009    25 CPU/1       0:01 50.00%  2.44% -         cc1plus
>

You'll see the same behaviour even on FreeBSD if the CPU-intensive commands
finish quickly. The CPU-states display is a like a running-average, the
process-display is more like a snapshot. Try reducing the sleep time to, say,
.1s or run a few `openssl speed' tests to see this.

-RVP
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic