SUMMARY: Let a Process freeze?

From: Jochen Bern (bern@kleopatra.Uni-Trier.DE)
Date: Fri Sep 17 1993 - 03:15:43 CDT


Hi fellow Managers,

> a probably easy one this Time (probably not worth a Summary, say "Pleeeze"
> if you disagree :-) ...

... and three Mails saying it came back. So here we go. My Question was:

> I have two Processes running in parallel. The Processes are "badly
> swappable", ie. the Adresses they access hop around wildly. Since there
> are *two* of them, RAM is not sufficient and the Machine swaps like crazy.
> I want one to stop executing so that the other gets swapped back in,
> and release the first one when the first Process is done. How to?

First and easiest Answer: Send Signals with kill -STOP to freeze, and with
kill -CONT to continue running; Sorry Guys, can't name you all here. ;-)

Other Things worth mentioning:

mike@trdlnk.chi.il.us (Michael Sullivan):
> One problem I sometimes have sometimes seen when doing this is that if
> the process you are stopping is running out of a script under a shell
> that doesn't understand job control (e.g. sh), the shell may
> misinterpret the notification from the wait() system call that the
> child process is stopped as it having exited and continue on with the
> next statement in the script. In this case you should stop the shell
> process first, and continue it after the process doing the real work
> has been continued.

(Anonymized)
> (This type of request doesn't belong in sun-managers...)

Now that I know the Answer, I agree; When I asked, I anticipated something
like "go into the Kernel's Process Table and tweak the XYZ Flag".

camm@fmlrnd.co.uk (Ian Camm - Systems Administrator):
> Try looking into queuedefs. This allows you to specify how many at,batch and
> cron jobs run at any one time.
John Valdes <valdes@geosun.uchicago.edu>:
> Actually, you can configure batch(1) queues to execute only one job at
> a time. Take a look at queuedefs(5). Of course, there are a lot of
> other things you can do with NQS that you can't do with batch.

Indeed. I have NQS running now and I'm really fond of it. From NQS, I now get
one Process per Queue, two Queues per Host with one Queue having a serious
Priority Advantage but only accepting "small" Jobs, PLUS Load Balancing
across the Cluster, PLUS Lotsa other Gimmicks for the Queues.

And now how to AVOID such Situations:

Dan Stromberg <strombrg@hydra.acs.uci.edu>:
> You might be able to change the threshold at which sunos switches from
> paging to swapping. Usually sunos just pages, but for huge jobs with
> competing working sets like this, swapping tends to work better
> (somewhat counterintuitive, but supposedly true). This would probably
> mean frobbing some kernel variable, though I must admit I'm not sure
> which. Hal Stern's tutorial on tuning kernels might mention one...

Note that Dan uses the more restrictive Definition of "Swapping", ie.
Paging = Move Memory Pages to Disk, keep Process running
Swapping = Move a Process out completely

> You might also be able to increase process timeslices globally. This
> should improve batch performance (sometimes quite a lot), but degrade
> interactive response times.

ObJoke:

> Thanx a F4240h,
> J. Bern

(Anonymized)
> and what is F424oh ?
blymn@mulga.awadi.com.AU (Brett Lymn):
> Get with it man! That should be 0xf4240!

:-)



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:15 CDT