mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Hunter <sean@dev.sportingbet.com>
To: bobyetman@att.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: Loadavg calculation
Date: Mon, 6 Nov 2000 08:14:26 +0000	[thread overview]
Message-ID: <20001106081426.I6131@bart.dev.sportingbet.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0011050746090.634-100000@juryrig.worldnet.att.net>
In-Reply-To: <Pine.LNX.4.21.0011050746090.634-100000@juryrig.worldnet.att.net>; from bobyetman@att.net on Sun, Nov 05, 2000 at 07:55:40AM -0500

Sorry, I know this is a little left-field, but how about redesigning your
process so that instead of using a load_avg, you start all your calculations
from a single server on each node?  It could queue up incoming calculations,
and fork a child to do each one.

Of course, it would catch a signal when the child died, so you'd immediately
know when to start up another calculation.  If you liked, it could check the
one-minute load avg from time to time to see what would be a friendly level of
calculations overall, adjust the overall level of concurrent child processes
accordingly.

The timing, however, would still come from a signal, and would thus be
instantaneous.

Or am I being totally dumb?

Sean

On Sun, Nov 05, 2000 at 07:55:40AM -0500, bobyetman@att.net wrote:
> 
> I'm working a project a work that is using Linux to run some very
> math-intensive calculations.   One of the things we do is use the 1-minute
> loadavg to determine how busy the machine is and can we fire off another
> program to do more calculations.    However, there's a problem with that.
> 
> Because it's a 1 minute load average, there's quite a bit of lag time from
> when 1 program finishes until the loadavg goes down below a threshold for
> our control mechanism to fire off another program.
> 
> Let me give an example (all on a 1-cpu PC)
> 
> HH:MM:SS
> 00:00:00    		fire off 4 programs 
> 00:01:00		loadavg goes up to 4
> 00:01:30		3 of the 4 programs finish loadavg still at 4
> 00:02:20		load avg goes down to 1, below our threshold
> 00:02:21		we fire off 3 more programs.
> 
> We'd like to reduce that almost 50 second lag time.  Is it possible, in
> user-space, to duplicate the loadavg calculation period, say to a 15
> second load average, using the information in /proc?
> 
> The other option we looked at, besides using loadavg, was using idle pct%,
> but if I read the source for top right, involves reading the entire
> process table to calculate clock ticks used and then figuring out how many
> weren't used.
> 
> Ideas, opinions welcome.  Yes, I read the list, so either respond direct
> to me, or to the list.
> 
> bobyetman@att.net (Robert A. Yetman)
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> Please read the FAQ at http://www.tux.org/lkml/
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-11-06  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-05 12:55 bobyetman
2000-11-05 13:58 ` Andi Kleen
2000-11-05 14:01 ` bert hubert
2000-11-05 20:24 ` Albert D. Cahalan
2000-11-06  8:14 ` Sean Hunter [this message]
2000-11-06 22:39   ` Pavel Machek
2000-11-07 14:20 Nathan Scott

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=20001106081426.I6131@bart.dev.sportingbet.com \
    --to=sean@dev.sportingbet.com \
    --cc=bobyetman@att.net \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®