* swap space - reserved space?
@ 1997-12-08 5:00 Andrew Ireland
1997-12-08 5:00 ` Jim Granfield
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Andrew Ireland @ 1997-12-08 5:00 UTC (permalink / raw)
In our dec 4100, system we have configured an RZ29B disk, partition rz9h as
primary
swap, /sbin/swapdefault points to this device, and yet in an operational
environment
we get the following:
Total swap:
Allocated space 244459 pages
Reserved space 229482 pages
Just from the above you can imagine that we are getting quite a lot of
"swap space less than 10 percent free"
what is this "reserved space", who is it resevred by and for what reason?
Andrew Ireland
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: swap space - reserved space?
1997-12-08 5:00 swap space - reserved space? Andrew Ireland
1997-12-08 5:00 ` Jim Granfield
@ 1997-12-08 5:00 ` Brian Weaver
1997-12-08 5:00 ` Mat Butler
1997-12-09 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
3 siblings, 0 replies; 6+ messages in thread
From: Brian Weaver @ 1997-12-08 5:00 UTC (permalink / raw)
You might want to try changing your swap mode from
immediate to deffered mode. Solved my probles.. Do a man
on swapon
Andrew Ireland (andy@ascada.demon.co.uk) wrote:
: In our dec 4100, system we have configured an RZ29B disk, partition rz9h as
: primary
: swap, /sbin/swapdefault points to this device, and yet in an operational
: environment
: we get the following:
:
:
: Total swap:
:
: Allocated space 244459 pages
: Reserved space 229482 pages
:
: Just from the above you can imagine that we are getting quite a lot of
:
: "swap space less than 10 percent free"
:
: what is this "reserved space", who is it resevred by and for what reason?
:
: Andrew Ireland
:
:
--
------------------------------------------------------------------------
Brian Weaver weaver(at)psd.k12.co.us
UNIX Guru
Poudre School District, Ft. Collins, CO.
http://www.psd.k12.co.us
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: swap space - reserved space?
1997-12-08 5:00 swap space - reserved space? Andrew Ireland
@ 1997-12-08 5:00 ` Jim Granfield
1997-12-08 5:00 ` Brian Weaver
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Jim Granfield @ 1997-12-08 5:00 UTC (permalink / raw)
To: Andrew Ireland
The OS default to immediate mode swap reserving this space. If you
delete or rename the file /sbin/swapdefault, it will put you in deferred
swap mode and not automatically allocate. See p 1-12 of the System
Tuning and Performance Manual.
jim
Andrew Ireland wrote:
>
> In our dec 4100, system we have configured an RZ29B disk, partition rz9h as
> primary
> swap, /sbin/swapdefault points to this device, and yet in an operational
> environment
> we get the following:
>
> Total swap:
>
> Allocated space 244459 pages
> Reserved space 229482 pages
>
> Just from the above you can imagine that we are getting quite a lot of
>
> "swap space less than 10 percent free"
>
> what is this "reserved space", who is it resevred by and for what reason?
>
> Andrew Ireland
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: swap space - reserved space?
1997-12-08 5:00 swap space - reserved space? Andrew Ireland
1997-12-08 5:00 ` Jim Granfield
1997-12-08 5:00 ` Brian Weaver
@ 1997-12-08 5:00 ` Mat Butler
1997-12-09 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
3 siblings, 0 replies; 6+ messages in thread
From: Mat Butler @ 1997-12-08 5:00 UTC (permalink / raw)
As I understand it there are two modes of configuring swap - lazy and
greedy. Greedy mode decides at process start up exactly how much swap it
needs and reserves it. Lazy mode basically involves processes only going
to get more swap if and when it requires more and so has no need to
reserve any.
The main difference between these two modes is the way that they fall
down if they run out of swap. As greedy is default I assume this is the
safest. When you start to out of swap you get a nice little error
message and the offending process that tried to reserve the space is
allowed to run but if swap is exceeded to process is murdered. In lazy
mode I think things are more catastophic and a possible chain of
processes are killed. I'm pretty sure I was told that this can cause a
system crash.
So, if you want to avoid a crash and allow your processes to be lazy
ensure that you have plenty of swap.
Andrew Ireland wrote:
>
> In our dec 4100, system we have configured an RZ29B disk, partition rz9h as
> primary
> swap, /sbin/swapdefault points to this device, and yet in an operational
> environment
> we get the following:
>
> Total swap:
>
> Allocated space 244459 pages
> Reserved space 229482 pages
>
> Just from the above you can imagine that we are getting quite a lot of
>
> "swap space less than 10 percent free"
>
> what is this "reserved space", who is it resevred by and for what reason?
>
> Andrew Ireland
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: swap space - reserved space?
1997-12-08 5:00 swap space - reserved space? Andrew Ireland
` (2 preceding siblings ...)
1997-12-08 5:00 ` Mat Butler
@ 1997-12-09 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1997-12-13 5:00 ` john hall
3 siblings, 1 reply; 6+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 1997-12-09 5:00 UTC (permalink / raw)
In article <881590435.27414.0.nnrp-05.9e982017@news.demon.co.uk>, "Andrew Ireland" <andy@ascada.demon.co.uk> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: swap space - reserved space?
1997-12-09 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
@ 1997-12-13 5:00 ` john hall
0 siblings, 0 replies; 6+ messages in thread
From: john hall @ 1997-12-13 5:00 UTC (permalink / raw)
Alan Rollow - Dr. File System's Home for Wayward Inodes. wrote:
> -------------------->8
> 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.
>
> 8<------------------
This reveals one sublety involved in moving a DU system from
one disk set to another (e.g. internal to external SCSI) with
immediate swapping policy (i.e. /sbin/swapdefault pointing to a
device which exists).
Unaltered, the /sbin/swapdefault will still be linked to
the same disk partition as previously rather than a partition
on the new device addresses.
If there are now no disks at this device addresss then you'll
have changed from immediate to deferred swap mode.
If swapdefault still points to an existing disk partition then
it will happily use it. Hopefully the disk didn't have your vital
data on it!
regards
john hall
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1997-12-13 5:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-12-08 5:00 swap space - reserved space? Andrew Ireland
1997-12-08 5:00 ` Jim Granfield
1997-12-08 5:00 ` Brian Weaver
1997-12-08 5:00 ` Mat Butler
1997-12-09 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1997-12-13 5:00 ` john hall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox