From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,dfe319d5a3bb0588 X-Google-Attributes: gidfee84,public From: Bob Harris Subject: Re: Low on swapspace Date: 2000/02/08 Message-ID: <080220001010519433%harris@zk3.dec.com>#1/1 X-Deja-AN: 583226293 Content-Transfer-Encoding: 8bit References: <389EDF65.C71E1B0@viewlocity.com> To: Marcus Johansson Posted-And-Mailed: yes Content-Type: text/plain; charset=ISO-8859-1 Organization: Digital Equipment Corporation, Palo Alto, CA, USA Mime-Version: 1.0 User-Agent: YA-NewsWatcher/4.2.4 Newsgroups: comp.unix.osf.osf1 [[ This message was both posted and mailed: see the "To," "Cc," and "Newsgroups" headers for details. ]] In article <389EDF65.C71E1B0@viewlocity.com>, Marcus Johansson wrote: >Hi! > >I have a Compaq Unix 5.0 server who is constantly complaining about lack >of swapspace. There is absolutely nothing running on it, and i've >configured it pretty much default, no strange things at all. > >I know this isn't much information, but I don't know what to include.. >Except for this: > ># bash-2.03# swapon -s > Reserved space: 12677 pages ( 77%) > >What is reserved space? Since you have a V5.0 system, you want to use /usr/bin/X11/dxkerneltuner utility and change the 'vm' parameter 'vm_swap_eager' to zero. The vm_swap_eager parameter is kept in the /etc/sysconfigtab file. On V4.0 and earlier versions, specifying eager vs lazy was done by having a symbolic link named /sbin/swapdefault which pointed to your swap device if you wanted eager swapping. In V5.0 this has been replaced with the sysconfigtab 'vm_swap_eager' parameter. The next time you reboot your system, processes will only allocate space in swap file when they are actually swapped. Currently in eager mode, the applications reserver as much space in the swap area as they have virtual memory, even if they are never swapped. If you have lots of memory and do not swap very often, then turning off eager swap mode can allow you to get away with having much less swap space. However, if you do end up needing to swap processes, then if you do not have sufficent swap space for all the virtual memory of all the processes that need to be swapped, then the system will be forced to actually kill processes that need to swap but can not get the swap space to be swapped into. That is the trade-off you have to make when deciding on using eager vs lazy swap modes. Personally on my workstation, I use lazy swap mode, but I also have a reasonable amount of swap space and I keep some spare disk partitions hanging around just in case I need to add some swap space. It happens from time to time, like when I decided to play with the 'xv' utility on a huge picture image, or start too many compiles and links at the same time, or Netscape has yet another memory leak and eats up too much memory and increases swapping on other processes, etc... But for the most part, lazy swap mode (vm_swap_eager=0) is not a problem for me. Your mileage may vary.