what exactly is "wasted swap space"
Alan's Home for Wayward Notes File.
alan at shodha.enet.dec.com
Wed Feb 6 14:59:01 AEST 1991
In article <9558 at dog.ee.lbl.gov>, envbvs at epb7.lbl.gov (Brian V. Smith) writes:
> [ The author has observed "wasted" page/swap space on V3.0 and
> wants to know what it is. ]
> Why is there "wasted" swap space?
>
> Can anyone shed any light on what is happening? I will be glad to provide
> more details if necessary. Here is the output from pstat -s:
In V3.1 and earlier page/swap allocated via an algorithm
that would use successively larger values as more space
was needed. Two values, configurable in recent version,
were used to determine how the space was allocated. The
first allocation would be for "dmmin", typically 16 KB.
The next allocation would be for dmmin*2, followed by
dmmin*4, dmmin*8 and so on until "dmmax", which was usually
512 KB. Once the allocation size reached dmmax it would
be used until the max process size was reached and you
got some variation of the message, "out of core".
The problem with this algorithm is that it tends to waste
lots of space for big allocations (most X programs for
example). If your program needed something less than
16 KB then that's all that would be allocated. But if you
needed 17, then 48 KB would be allocated (16+32). The space
that is wasted is the difference between what is allocated
and actually used.
In V4.0 one size, swapfrag, is used for all allocations. Rather
than being a function of dmmin and dmmax the max sizes of a
process are controlled by there configuration paramaters;
maxtsiz for text, maxdsiz for data and maxssiz for stack. One
other change of note in V4.0 is that rather than allocating
space initially ULTRIX only reserves it. The allocation is done
when a process needs to page or be swapped.
>
> --
> Brian V. Smith (bvsmith at lbl.gov)
> Lawrence Berkeley Laboratory
--
Alan Rollow alan at nabeth.cxn.dec.com
More information about the Comp.unix.ultrix
mailing list