Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.)
Subject: Re: Swap space problem
Date: 1996/08/29	[thread overview]
Message-ID: <504uhc$fa2@nntpd2.cxo.dec.com> (raw)
In-Reply-To: 322489A4.1DF2@sandoz.com



In article <322489A4.1DF2@sandoz.com>, Ekkehard Goerlach <ekkehard.goerlach@sandoz.com> writes:

>On one of our machines we still run OSF/1 V2.0. Frequently we have a 
>swap space problem on that workstation (a AXP 3000/300), i.e. the 
>system issues messages like 
>"Unable to allocate swap space".
>
>Right now it seems to me that this is correlated to whether some 
>directories hold a large number (several thousand) files. When these 
>files are archived away, the system is quiet again.
>
>Is that observation resonable ?

Do you have an application that allocates dynamic memory according
to how many files are stored in that directory?  If so, then it
might be related.  Otherwise, I doubt it.

The inability to "allocate" page/swap space is nearly always
due to there not being enough.  If you're running in the default
page/swap allocation mode, "allocate" really means reserve.

DEC OSF/1 (now Digital UNIX) supports two page/swap space allocation
methods, often called "eager" and "lazy".  Eager is the default.
This method reserves page and swap space as virtual memory is
created.  The space isn't actually allocated on the page/swap
devices until it is needed.  The reservation ensures that if
space is needed there will be enough.  The disadvantage is that
it limits the system wide amount of virtual memory to the amount
of page/swap space.

The other method, "lazy", doesn't reserve the space.  As before
it is allocated when needed.  The advantage is that the limit of
system virtual memory is now limited the amount of page/swap space
plus the amount of available memory.

The disadvantage is rather severe.  If a process needs page/swap
space and there isn't any available, then some other process will
be killed so its space can be used.  The goal is to keep the current
process running.  So, it is a trickle down affect:

o  the current process wants more memory
o  some other process using memory is selected to be paged or swapped out,
   but there's no page/swap for it.
o  Some other process is selected and killed, so the paging processing
   can use the space.

On systems where the amount of page/swap needed is very predictable,
it allows sizing memory and page/swap space to exactly fit the
application.  On a system where the amount of page/swap space
needed isn't very predictable, it is fairly dangerous, because
useful processes can be killed off.

>Can I change some system parameters to improve things ?

If the problem is lack of page/swap space and you're willing to
risk the disadvantages of "lazy" mode, remove the file /sbin/swapdefault
and reboot.  If you're not willing to risk it, but sufficient page/swap
space is the problem, get more.  Alternately, find a way to get your
programs to use less memory.

>Is this unique to V2.0 or might it happen on V3.2, too ?

People underestimating how much page/swap space they'll need has been a
problem since V1.2.  V1.2 made it particularly hard since it used a
dynamic memory allocation algorithm that was very unfriendly to large
memory allocations.  That was fixed in V1.3.  V3.2C saw some improvment
in virtual memory usage and the ability to configure some systems for
smaller amounts of physical memory.

I'm not sure that a lack of reservable page/swap space is the
problem, but is the most common cause of this symtom.

>
>Any hints or help are welcome
>Ekkehard
>
>--------------------------------------------------------------------
>Ekkehard Goerlach                             c/o Sandoz Pharma Ltd. 
>PCB/CF Structural and Analytical Chemistry    CH-4002 Basle 
>email: ekkehard.goerlach@sandoz.com           Switzerland
>
--
Alan Rollow				alan@nabeth.cxo.dec.com




  reply	other threads:[~1996-08-29  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-28  4:00 Swap space problem Ekkehard Goerlach
1996-08-29  4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes. [this message]
1996-08-29  4:00 ` Georg Umgiesser
1996-08-30  4:00 ` Patrick O'Rourke USG
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox