* Help Swap
@ 2000-02-02 5:00 M. Cao
2000-02-02 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
0 siblings, 1 reply; 2+ messages in thread
From: M. Cao @ 2000-02-02 5:00 UTC (permalink / raw)
Hi,
My digital unix 4.0D system runs out of swap space.
Can you give me a suggestion what to do .. and how ?
What is the command to check the available swap space ?
Thanks
Tam
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Help Swap
2000-02-02 5:00 Help Swap M. Cao
@ 2000-02-02 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
0 siblings, 0 replies; 2+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 2000-02-02 5:00 UTC (permalink / raw)
In article <Pine.A41.4.10.10002020823190.202162-100000@homer17.u.washington.edu>, "M. Cao" <mcao@u.washington.edu> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-02-02 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-02-02 5:00 Help Swap M. Cao
2000-02-02 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox