From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,29ee687a7b9d69ea X-Google-Attributes: gid1164f8,public From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) Subject: Re: Help Swap Date: 2000/02/02 Message-ID: <879skv$g28$1@mailint03.im.hou.compaq.com>#1/1 X-Deja-AN: 580894155 Distribution: world References: X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 949515743 16456 16.82.16.67 (2 Feb 2000 18:22:23 GMT) Organization: Digital Equipment Corporation Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) NNTP-Posting-Date: 2 Feb 2000 18:22:23 GMT Newsgroups: comp.sys.dec In article , "M. Cao" writes: >My digital unix 4.0D system runs out of swap space. >Can you give me a suggestion what to do .. and how ? The two easy choices are: 1. Use less virtual memory. That will probably mean changing applications to use less memory or reducing the system load. 2. Get more page/swap space. Digital UNIX use raw disk partitions for system wide page/swap space. If you have a spare disk partition, you can add it to the system page/swap space by using the swapon(8) command. This will also show how the space is being used. Now, a note about usage... By default the system *reserves* page and swap space for most pages of virtual memory. The space isn't actually allocated until needed. You'll see this reflected in the summary shows by swapon(8). Each individual space may have space allocated from it as needed, but the total is where the space is reserved. If you're not paging much, if at all, there won't be much space allocated. Since you're using lots of virtual memory, much of the space will be reserved. There is another method of reservation, often called "lazy". This method carries risks if not used carefully, so read the system administration documentation on the subject. All the base system documentation is on the documentation CDROM that came with the system distribution. The problem with "lazy" mode is that it allows creating more virtual memory than available page/swap space. If a process needs to page or swap and there isn't space for it, some other process will be killed to get that space back. I believe the kernel will prefer "idle" processes, but there are interesting things that look idle (network daemons for example). To use "lazy" mode, you need to remove the link /sbin/swapdefault and reboot. Another way to get more page/swap space is harder to use, but allows using file system space instead of raw disk partitions. The mmap(2) system call has options that allow using a file as the backing store for virtual memory. A program using mmap(2) to create an area of virtual memory could specify its own page/swap for that memory, which wouldn't come from the system wide space. >What is the command to check the available swap space ? swapon(8) with the -s option. > >Thanks >Tam > > -- Alan Rollow alan@nabeth.cxo.dec.com