From: sirjofri <sirjofri+ml-9front@sirjofri.de>
To: 9front@9front.org
Subject: [9front] Understanding milli-CPUs (/dev/sysstat)
Date: Fri, 7 Jan 2022 12:01:15 +0000 (UTC) [thread overview]
Message-ID: <7e13be65-765d-4f6e-ad2a-e1646f01c53d@sirjofri.de> (raw)
Hello all,
According to cons(3), load inside /dev/sysstat is a number in milli-CPUs.
How is this number to interpret?
Looking at stats.c they compare the number with 1000 (times the number of
cpus).
However, I have the following issue:
I wrote a daily script which sends me an email via a cron job. The mail
contains this load value from /dev/sysstat.
When running the script like a normal shell script I get "reasonable"
values (e.g. 147). Via cron in my mailbox I always read something close
to 2000 (but always more than 1000).
Wouldn't it max out at 1000, since 1000 would be 100% cpu load? I don't
understand the value properly, but that would make sense considering the
details in stats.c.
And why is the value so different when running from a cron job? It's
running on the same machine. However, rcpu to the same machine also makes
a huge difference:
; cat /dev/sysstat
... 76 ...
; rcpu -h $sysname -c cat /dev/sysstat
... 512 ...
(The other numbers are very similar)
I don't understand it...
sirjofri
next reply other threads:[~2022-01-07 12:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 12:01 sirjofri [this message]
2022-01-07 15:10 ` Benjamin Riefenstahl
2022-01-09 8:14 ` Anthony Martin
2022-01-09 12:36 ` Benjamin Riefenstahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e13be65-765d-4f6e-ad2a-e1646f01c53d@sirjofri.de \
--to=sirjofri+ml-9front@sirjofri.de \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).