* Swap space problem
@ 1996-08-28 4:00 Ekkehard Goerlach
1996-08-29 4:00 ` Georg Umgiesser
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ekkehard Goerlach @ 1996-08-28 4:00 UTC (permalink / raw)
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". Shutting down all X apps does not
help. A reboot gives only a limited time to do something before the
system runs out of swap space again.
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 ? Can I change some system parameters
to improve things ? Is this unique to V2.0 or might it happen on V3.2,
too ?
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Swap space problem
1996-08-28 4:00 Swap space problem Ekkehard Goerlach
1996-08-29 4:00 ` Georg Umgiesser
@ 1996-08-29 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-08-30 4:00 ` Patrick O'Rourke USG
2 siblings, 0 replies; 4+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 1996-08-29 4:00 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Swap space problem
1996-08-28 4:00 Swap space problem Ekkehard Goerlach
@ 1996-08-29 4:00 ` Georg Umgiesser
1996-08-29 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-08-30 4:00 ` Patrick O'Rourke USG
2 siblings, 0 replies; 4+ messages in thread
From: Georg Umgiesser @ 1996-08-29 4:00 UTC (permalink / raw)
Ekkehard Goerlach wrote:
>
> 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". Shutting down all X apps does not
> help. A reboot gives only a limited time to do something before the
> system runs out of swap space again.
>
> 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 ? Can I change some system parameters
> to improve things ? Is this unique to V2.0 or might it happen on V3.2,
> too ?
>
> 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
I posted a possible answer to this problem some months ago:
The problem is with the X server, that continues allocating memory
without ever freeing it. You can solve the problem by changing in the
file "/usr/lib/X11/xdm/Xservers" the line starting with
":0 local /usr/bin/X11/X" to
":0 local /usr/bin/X11/X -terminate"
and then rebooting the machine. Now, every time you log out, the
X server frees all the memory it has allocated during the session.
Georg Umgiesser
--
__
^/..\^
----------------------------------------------------------m( 00 )m---
Georg Umgiesser | e-mail : georg@lagoon.isdgm.ve.cnr.it
Oceanography, ISDGM-CNR | web : http://www.isdgm.ve.cnr.it/~georg/
1364 S. Polo | tel : ++39 - 41 - 5216 875
30125 Venezia, Italia | fax : ++39 - 41 - 2602 340
---------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Swap space problem
1996-08-28 4:00 Swap space problem Ekkehard Goerlach
1996-08-29 4:00 ` Georg Umgiesser
1996-08-29 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
@ 1996-08-30 4:00 ` Patrick O'Rourke USG
2 siblings, 0 replies; 4+ messages in thread
From: Patrick O'Rourke USG @ 1996-08-30 4:00 UTC (permalink / raw)
Ekkehard Goerlach wrote:
>
> 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". Shutting down all X apps does not
> help. A reboot gives only a limited time to do something before the
> system runs out of swap space again.
>
> 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 ? Can I change some system parameters
> to improve things ? Is this unique to V2.0 or might it happen on V3.2,
> too ?
I cannot say based on the information posted whether or not those large
directories
are related to the swap space problem. I suppose it depends on what
applications,
if any, are accessing the directories.
You might want to try running the system in 'lazy' swap mode; the system
is in
'eager' swap mode by default. You can do this by renaming the symbolic
link
/sbin/swapdefault and doing a reboot.
Whenever a process allocates virtual memory (e.g. stack, malloc, shm
segments) the
operating system will reserve a corresponding amount of swap space. Thus
the OS is
guaranteed to have a place to write this memory in the event it must
page it out at
some point in the future. This check is not done in 'lazy' mode and the
OS will
allow you to overcommit swap space (i.e. the total amount of virtual
memory allocated
exceeds the amount of swap space). Normally this is okay since the
system rarely
fills up all of swap space. However if the demand for physical memory
is so high
that swap space does become full, the OS will kill a process to make
physical memory
available. The process selected is somewhat arbitary and may not be the
one you
would have chosen. If this is the case you will need to add another
swap partition
(see the swapon command).
Pat
--
Patrick O'Rourke (603)
881-0124
orourke@zk3.dec.com Office:
ZK3/3S05
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1996-08-30 4:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-28 4:00 Swap space problem Ekkehard Goerlach
1996-08-29 4:00 ` Georg Umgiesser
1996-08-29 4:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1996-08-30 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