From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96936473114818.tru64-unix-managers.marc@archive.invalid> From: Peter Chapin Date: Tue, 19 Sep 2000 11:58:19 +0000 To: tru64-unix-managers Subject: SUMMARY: "Swap space below 10 percent free" X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96936473114818 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" "Bochnik, William J" Chan Cao Michael H. Martel "Rub=E9n Cortegoso" "Davis, Alan" Selden E Ball Jr Gavin Kreuiter Lindsay Wakeman Ryan McConigley Thanks! Peter