Re: Multiple CPU and Load Average



In article <Smwbg.65639$PH3.32603@xxxxxxxxxxxxxxxxxxxxx>,
Ignoramus23298 <ignoramus23298@xxxxxxxxxxxxxxxxxxxx> wrote:
Suppose, hypothetically, that I have a two CPU machine (or a dual
core machine).

Suppose further that there are two processes running, each an infinite
calculation loop (no swapping, I/O or network), each working 100% hard.

Suppose that everything else is idle.

What would be the load average, 1 or 2?

2. The load average is the average over the last N seconds of the
number of ready-to-run processes[1]; if you have two CPUs with one
process running on each and nothing else competing for cycles, that's
two processes.

(So if loadavg < #CPUs, you have CPU cycles that aren't getting used,
and if loadavg > #CPUs, you have idle processes that are ready to run
but waiting for a CPU to run on.)

dave

[1] It's usually reported as three different numbers calculated the same
way with three different values of N; the first one is the shortest
time, but I don't know off the top of my head exactly what the
intervals are.

--
Dave Vandervies dj3vande@xxxxxxxxxxxxxxxxxxx
DONT use gets at all. It really is a bug waiting to happen.
Yes. (Except on one DOS box belonging to Dan Pop. <G>)
--Mark McIntyre and David Thompson in comp.lang.c
.



Relevant Pages

  • Re: Multiple CPU and Load Average
    ... On Saturday 20 May 2006 08:01, Dave Vandervies stood up and spoke the ... Suppose further that there are two processes running, ... The load average is the average over the last N seconds of the ... (So if loadavg < #CPUs, you have CPU cycles that aren't getting used, ...
    (comp.os.linux.misc)
  • Re: GCC on multiprocessor platform?
    ... Make sure that there are enough processes running to require all available ... cpus. ... Different disk/disk controllers/memory bandwidth/etc will make your ...
    (comp.unix.bsd.openbsd.misc)
  • Re: top output: 8 cpus busy in user-mode activities, 6 processes running
    ... 8 cpus busy in user-mode activities, 6 processes running ... 0:00   3 oracle ...
    (RedHat)
  • Re: Multiple CPU and Load Average
    ... Suppose further that there are two processes running, ... calculation loop (no swapping, I/O or network), each working 100% hard. ... The load average is the average number of processes that are either running or ready to be run. ... If both CPUs are 100% busy, there must always be at least two processes ready to run, at all times, one for each CPU. ...
    (comp.os.linux.misc)
  • Re: Multiple CPU and Load Average
    ... Suppose further that there are two processes running, ... What would be the load average, ... to synchronise with the handheld until a simple reboot. ... Yes, this happens to me whenever a screenshot is grabbed, once in 10 minutes. ...
    (comp.os.linux.misc)