* cron, inetd killed when other jobs use too much memory
@ 1996-09-23 4:00 David Starks-Browning
1996-09-23 4:00 ` Drew Kramer
1996-09-24 4:00 ` Patrick O'Rourke USG
0 siblings, 2 replies; 6+ messages in thread
From: David Starks-Browning @ 1996-09-23 4:00 UTC (permalink / raw)
In Digital Unix 3.2C running on a an AlphaStation 250 4/266, occasionally
an application will consume excessive resources so that the system runs
out of virtual memory.
Unfortunately, often the processes that are killed in this situation are
crucial daemons like inetd or cron. I understand the system's need to
kill processes to avoid crashing, but killing crucial processes like these
is not much better than crashing.
It seems rather absurd to me that dU would kill cron or inetd rather than
a user application, preferably the one consuming too much memory.
Is there some way to avoid this behavior?
Thanks for your help.
Sincerely,
David
=========================================================================
David Starks-Browning | starks@EMBL-Heidelberg.DE
Parallel Programming Consultant |
Supercomputing Resource for Molecular Biology |
European Molecular Biology Laboratory |
Meyerhofstrasse 1 | tel: +49(0)6221-387 279
D-69117 Heidelberg, Germany | fax: +49(0)6221-387 306
=========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cron, inetd killed when other jobs use too much memory
1996-09-23 4:00 cron, inetd killed when other jobs use too much memory David Starks-Browning
@ 1996-09-23 4:00 ` Drew Kramer
1996-10-01 4:00 ` Peter da Silva
1996-09-24 4:00 ` Patrick O'Rourke USG
1 sibling, 1 reply; 6+ messages in thread
From: Drew Kramer @ 1996-09-23 4:00 UTC (permalink / raw)
David Starks-Browning wrote:
>
> In Digital Unix 3.2C running on a an AlphaStation 250 4/266, occasionally
> an application will consume excessive resources so that the system runs
> out of virtual memory.
>
> Unfortunately, often the processes that are killed in this situation are
> crucial daemons like inetd or cron. I understand the system's need to
> kill processes to avoid crashing, but killing crucial processes like these
> is not much better than crashing.
>
> It seems rather absurd to me that dU would kill cron or inetd rather than
> a user application, preferably the one consuming too much memory.
>
> Is there some way to avoid this behavior?
>
> Thanks for your help.
>
> Sincerely,
> David
>
>
It seems to me that you should run swap in what I call eager allocation
mode. If you have removed the /sbin/swapdefault link, put it back!
This should be a symbolic link to your primary swap device.
Here's mine: /sbin/swapdefault -> ../dev/rz0b
If you don't have this link, when the system boots it will say:
Sep 3 10:49:03 foo vmunix: vm_swap_init: warning /sbin/swapdefault swap
device not found
Sep 3 10:49:03 foo vmunix: vm_swap_init: swap is set to lazy (over
commitment) mode
This means you are in lazy (the opposite of eager) swap mode. In a
nutshell, the difference is that in lazy mode, no swap is allocated
until a proccess tries to swap or page. If a big fat process comes
along, it is a random chance who gets nailed during a virtual memory
starvation. In eager mode, the swap is allocated at the same time
virutal memory is alocated. This means that if a process has a 32MB
virtual size, then it will also "reserve" 32MB of swap space. This
means that processes (like init or cron) will always be able to swap out
successfully. The process that will die is the big fat one that is
trying to pig up virtual memory.
The consequence of running in eager mode is that you probably will have
to configure more swap space, which you probably need to do anyway.
-drew
-------
Drew Kramer kramer@pa.dec.com
"Welcome to the machine"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cron, inetd killed when other jobs use too much memory
1996-09-23 4:00 cron, inetd killed when other jobs use too much memory David Starks-Browning
1996-09-23 4:00 ` Drew Kramer
@ 1996-09-24 4:00 ` Patrick O'Rourke USG
1 sibling, 0 replies; 6+ messages in thread
From: Patrick O'Rourke USG @ 1996-09-24 4:00 UTC (permalink / raw)
David Starks-Browning wrote:
> It seems rather absurd to me that dU would kill cron or inetd rather than
> a user application, preferably the one consuming too much memory.
I agree that the method in selecting a victim process can be improved,
however, the process with the most memory may *not* be the one to kill.
It can be difficult for the system to decide which process on the system
is the least important, it often depends on what the system is being
used for.
> Is there some way to avoid this behavior?
You can run in eager swap mode or increase the amount of swap space so
that the system has enough (this may take a bit of trial and error).
Pat
--
Patrick O'Rourke (603)
881-0124
orourke@zk3.dec.com Office:
ZK3/3S05
porourke@world.std.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cron, inetd killed when other jobs use too much memory
1996-09-23 4:00 ` Drew Kramer
@ 1996-10-01 4:00 ` Peter da Silva
1996-10-02 4:00 ` Ron Natalie
0 siblings, 1 reply; 6+ messages in thread
From: Peter da Silva @ 1996-10-01 4:00 UTC (permalink / raw)
Has Digital fixed the VM system in 4.0 to allocate memory to processes from
the total virtual memory allowed, less some slack space, rather than either
not allocating at all or preallocating swap only? When systems had little real
memory it made sense to approximate (total VM == swap), but today we have
systems with hundreds of megabytes and it's unrealistic to allocate a
gigabyte of swap on a system with only a couple of gig total disk space.
--
Peter da Silva (NIC: PJD2) `-_-' 1601 Industrial Boulevard
Bailey Network Management 'U` Sugar Land, TX 77487-5013
+1 713 274 5180 "Har du kramat din varg idag?" USA
Bailey pays for my technical expertise. My opinions probably scare them
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cron, inetd killed when other jobs use too much memory
1996-10-01 4:00 ` Peter da Silva
@ 1996-10-02 4:00 ` Ron Natalie
1996-10-02 4:00 ` Peter da Silva
0 siblings, 1 reply; 6+ messages in thread
From: Ron Natalie @ 1996-10-02 4:00 UTC (permalink / raw)
> Has Digital fixed the VM system in 4.0 to allocate memory to processes from
> the total virtual memory allowed, less some slack space, rather than either
> not allocating at all or preallocating swap only?
If you're talking about OSF1 (presently Digital UNIX), it's been
configurable
for a long time. Read the "swapon" manpage.
-Ron
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: cron, inetd killed when other jobs use too much memory
1996-10-02 4:00 ` Ron Natalie
@ 1996-10-02 4:00 ` Peter da Silva
0 siblings, 0 replies; 6+ messages in thread
From: Peter da Silva @ 1996-10-02 4:00 UTC (permalink / raw)
In article <32528391.7E19@sensor.com>, Ron Natalie <ron@sensor.com> wrote:
> > Has Digital fixed the VM system in 4.0 to allocate memory to processes from
> > the total virtual memory allowed, less some slack space, rather than either
> > not allocating at all or preallocating swap only?
>
> If you're talking about OSF1 (presently Digital UNIX), it's been
> configurable
> for a long time. Read the "swapon" manpage.
*sigh*
That lets you configure whether memory is not allocated at all (deferred
mode) or preallocated from swap (immediate mode). It doesn't give you the
option of saying "when I allocate VM, allocate it from my total available
virtual memory (real memory + swap) rather then dedicating a chunk of swap
for me".
If you have a system with 256M real memory, say, and a 2GB disk, it would be
nice to be able to allocate 256M of swap, get a total of 512M of VM, but
not blow out random programs when you ran out of VM. To get 512M of usable
VM, you need to allocate 512M of disk. That's 1/4 of your disk space!
--
Peter da Silva (NIC: PJD2) `-_-' 1601 Industrial Boulevard
Bailey Network Management 'U` Sugar Land, TX 77487-5013
+1 713 274 5180 "Har du kramat din varg idag?" USA
Bailey pays for my technical expertise. My opinions probably scare them
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1996-10-02 4:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-23 4:00 cron, inetd killed when other jobs use too much memory David Starks-Browning
1996-09-23 4:00 ` Drew Kramer
1996-10-01 4:00 ` Peter da Silva
1996-10-02 4:00 ` Ron Natalie
1996-10-02 4:00 ` Peter da Silva
1996-09-24 4:00 ` Patrick O'Rourke USG
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox