From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6fdf80ce2c2591e7 X-Google-Attributes: gidfee84,public From: Patrick O'Rourke USG Subject: Re: Swap space problem Date: 1996/08/30 Message-ID: <32273504.41C6@zk3.dec.com>#1/1 X-Deja-AN: 177575416 references: <322489A4.1DF2@sandoz.com> content-type: text/plain; charset=us-ascii organization: CTG mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 3.0b6Gold (X11; I; OSF1 V4.0 alpha) 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