From: Vik Heyndrickx <vik.heyndrickx@veribox.net>
To: Doug Smythies <dsmythies@telus.net>,
"'Peter Zijlstra'" <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: loadavg 0.00, 0.01, 0.05 on idle
Date: Fri, 22 Jan 2016 01:43:07 +0100 [thread overview]
Message-ID: <56A17B1B.9030104@veribox.net> (raw)
In-Reply-To: <002901d1547a$f5309480$df91bd80$@net>
On 21/01/2016 19:38, Doug Smythies wrote:
> new = (old * 2037 + load * (2048 - 2037)) / 2048
> new = (1862 * 2037 + 2048 * (2048 - 2037)) / 2048
> new = 1862
>
> So, the 100% load will always be shown as 91% (double the old limit).
Math seems sound, but the fact is that the load on all my test machines
now drops to 0.00/0.00/0.00 on idle, and increases to e.g. on my octa-
core 8.00/8.00/8.00 on full load.
I used mprime -t to cause a full load on all cores.
load can never drop below 0, but can and will exceed 2048 unless nothing
else is running, which is then likely the reason why 8.00 is actually
reached for the 5 and 15 minute value despite the math here above.
I would not worry too much about the accuracy, because, with or without
the rounding, it takes more than three quarters of an hour to reach 100%
15-minute loadavg from idle, or the other way around 0% from full load.
> I have been running this proposed code with 100% load on CPU 7 for a couple
> of hours now, and the 15 minute load average is stuck at 0.91.
In theory possible, but any instantaneous load above 100% will raise
that 0.91 further.
I think I can easily change the calc_load algorithm further to have the
best of both worlds, but it will still take 45 minutes to reach a
15-minute avgload.
After 40 minutes, and just to be sure, I checked again, and my buildhost
now has the following load: 8.00, 8.02, 7.94.
--
Vik
next prev parent reply other threads:[~2016-01-22 0:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 9:23 [PATCH] sched: loadavg 0.00, 0.01, 0.05 on idle Vik Heyndrickx
2016-01-21 15:28 ` Peter Zijlstra
2016-01-21 18:38 ` Doug Smythies
2016-01-22 0:43 ` Vik Heyndrickx [this message]
2016-01-21 18:54 ` [tip:sched/urgent] sched: Fix non-zero idle loadavg tip-bot for Vik Heyndrickx
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=56A17B1B.9030104@veribox.net \
--to=vik.heyndrickx@veribox.net \
--cc=dsmythies@telus.net \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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