From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,fa15ef22191b6e6d X-Google-Attributes: gidfee84,public From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: swap space - reserved space? Date: 1997/12/09 Message-ID: <66kf8l$3cb@nntpd2.cxo.dec.com>#1/1 X-Deja-AN: 296721259 Distribution: world References: <881590435.27414.0.nnrp-05.9e982017@news.demon.co.uk> Organization: Digital Equipment Corporation Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Newsgroups: comp.unix.osf.osf1 In article <881590435.27414.0.nnrp-05.9e982017@news.demon.co.uk>, "Andrew Ireland" writes: > >In our dec 4100, system we have configured an RZ29B disk, partition rz9h as >primary swap... >Total swap: > > Allocated space 244459 pages > Reserved space 229482 pages > > [ a couple more lines delete ] > >what is this "reserved space", who is it resevred by and for what reason? For each page of virtual memory created, it should have an appropriate amount of disk space somewhere on the system so it can be paged out. Text (program instructions) may not need page/swap because the page can be read back from the original program. Zero filled pages that are never modified probably don't need page/swap either since the contents of the page are obvious. Shared memory or memory created via mmap(2) may be backed by the contents of a file. But, pretty much everything else needs page/swap space. The system offers the choice of whether page/swap space will be reserved for the memory when it is created. The default mode is to reserved page/swap as memory is created (as indicated by the presense of /sbin/swapdefault pointing to a device which exists). When page/swap reserved you are guaranteed that if a page needs to be written out, there will be enough page/swap for it. The alternative to not reserving page/swap space is the possibility that a page will need to be written and there won't be any space available for it. In this case the kernel starts picking processes to kill to free up space. There are cases where the amount of virtual memory that will be used is well enough known that only the extra amount of page/swap space will be configured, but usually use of the alternate page/swap reservation mode is fraught with peril. So, you either need to reduce the amount of virtual memory that you're trying to use, or configure more page/swap space. > >Andrew Ireland -- Alan Rollow alan@nabeth.cxo.dec.com