9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: 9front@9front.org
Subject: Re: [9front] Understanding milli-CPUs (/dev/sysstat)
Date: Sun, 09 Jan 2022 13:36:11 +0100	[thread overview]
Message-ID: <87ilut3x38.fsf@turtle-trading.net> (raw)
In-Reply-To: <YdqZZo+6iCYR7fQ9@alice> (Anthony Martin's message of "Sun, 9 Jan 2022 00:14:30 -0800")

Anthony Martin writes:
> /sys/src/9/port/proc.c:/^accounttime
> [...]
> 	 * ticks to go to zero.  so using HZ means this is
> 	 * approximately the load over the last second,
> 	 * with a tail lasting about 5 seconds.

So we should interprete the load as approximately the average number of
waiting processes over the last second, but with a smoothed curve over
approximately 5 seconds.  Right?

>	load = ((uvlong)load*(HZ-1)+n)/HZ;

That's the formula for what we call the "moving average" these days, I
think.  HZ is the number of ticks per second, so the time span is one
second here.

so long, benny

      reply	other threads:[~2022-01-09 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 12:01 sirjofri
2022-01-07 15:10 ` Benjamin Riefenstahl
2022-01-09  8:14   ` Anthony Martin
2022-01-09 12:36     ` Benjamin Riefenstahl [this message]

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=87ilut3x38.fsf@turtle-trading.net \
    --to=b.riefenstahl@turtle-trading.net \
    --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).