My original message was:
-----> cut here <-----
I've started getting frequent "Swap space below 10 percent free" messages
on my Tru64 (v4.0D) system. Although the system is not overflowing with
memory (64 MBytes physical, 128 MByte swap partition), I have not seen
this problem before in the years that the system has been operating. As
far as I know there has been no (recent) changes in the software on the
system that might account for this.
The output of "swapon -s" yields:
Swap partition /dev/rz0b (default swap):
Allocated space: 16384 pages (128MB)
In-use space: 4639 pages ( 28%)
Free space: 11745 pages ( 71%)
Total swap allocation:
Allocated space: 16384 pages (128MB)
Reserved space: 15307 pages ( 93%)
In-use space: 4639 pages ( 28%)
Available space: 1077 pages ( 6%)
Why might the "reserved" space be such a large percentage? What should I
be looking at to track this problem down more precisely.
-----> cut here <-----
My thanks to all those who replied (list below).
This problem is, in fact, a FAQ. The archives at
http://www.tru64.com/
contain a fair amount of information on this subject. Tru64 Unix has two
swap allocation modes. In the default mode the system reserves space in
the swap file whenever an application allocates virtual memory -- even
if the application never uses it. This insures the space will be
available if the application needs it. If the space can't be reserved
the application is told when it attempts to allocate the virtual address
space.
In "lazy" mode the system does not allocate pages in the swap file until
an application actually tries to use those pages. Since it's not too
unusual for an application to allocate memory that it never uses (fully)
this can conserve swap space. The disadvantage is now the application
encounters a problem when it does not expect it: when it's writing to
memory that it thought it already allocated successfully. The system
just kills applications abruptly when this happens.
I'm not too worried about applications getting killed abruptly in my
environment. Nor am I too concerned about the possible denial of service
attack this opens up. Thus I switched to lazy swap mode. This entails
renaming the file /sbin/swapdefault (a symbolic link to the default swap
partition) and rebooting. When the system sees no /sbin/swapdefault
file, it goes into lazy mode automatically. There is a message during
boot time to this effect.
The odd thing is that I'm almost certain that my system was set to lazy
mode in the past. Could it be that one of the patch kits changed it back
to the default mode? In any case, it definitely was not set to lazy mode
when I checked so I fixed that and now I'm happy.
Those who responded to my message:
"Clegg, Larry" <Larry_Clegg_at_intuit.com>
"Bochnik, William J" <BochnikWJ_at_bernstein.com>
Chan Cao <ccao_at_brooks.com>
Michael H. Martel <martelm_at_quark.vsc.edu>
"Rubén Cortegoso" <rcortegoso_at_uolmail.com.ar>
"Davis, Alan" <Davis_at_tessco.com>
Selden E Ball Jr <SEB_at_LNS62.LNS.CORNELL.EDU>
Gavin Kreuiter <gavin_at_transactive.usko.com>
Lindsay Wakeman <Lindsay.Wakeman_at_bl.uk>
Ryan McConigley <ryan_at_cs.uwa.edu.au>
Thanks!
Peter
Received on Tue Sep 19 2000 - 12:01:25 NZST