changing of swap allocation mode

From: Robert Kubarych <rkubaryc_at_sunyrockland.edu>
Date: Tue, 31 Aug 1999 15:57:13 -0400 (EDT)

Hi All,

We started getting occasional warning messages that available swap was
under 10%. We are using the default swap allocation mode (immediate), but
given our work load on that machine, and the amount of physical memory we
have (8 GIG) I think we can switch to deferred mode without adding any
additional swap space.

If someone with more UNIX expertise than me (there are scores of those
people on this list) would concur with my analysis below it would give me
a nice, warm, fuzzy feeling and I would feel a lot more confident in
making the switch to deferred mode.

TIA.

Rob

> I think the swapon -s info shows that our swap space is actually
> sufficient. The problem seems to be that we are using the default of
> immediate mode and we are reserving but not actually using a large amount
> of swap. We may want to switch to deferred mode. I think we have loads
> of memory and a very predictable work load.
>
> From the swapon man page:
>
> /*
> If you use the deferred mode of swap space allocation, you must estimate
> the total amount of virtual address space that will be both created and
> modified, and compare that total amount with the size of your system's
> physical memory. If this total amount is greater than the size of physical
> memory, the swap space must be large enough to hold the modified virtual
> pages that do not fit into your physical memory. If your system's
> workload is complex and you are unable to estimate the appropriate amount
> of swap space by using this mode, you should first use the default amount
> of swap space and adjust the swap space as needed.
> */
>
> I've done a calculation below which assumes that we created 827 MB (80% *
> 1034 MB) of virtual address space at the time I ran the swapon -s command.
> I figured I would be conservative and assume that we might create more va
> space than allocated swap space and then another 10%, and that all pages
> could be modified (which of course they wouldn't).
>
>
> My calculation of swap needed for deferred:
>
> va space that will be created: 1034 * 110% = ~1140MB
> va space that CAN be modified 1140MB
> --------
> 2280MB
>
> Physical memory 8GIG

>/sbin/swapon -s
Swap partition /dev/rz16b (default swap):
    Allocated space: 132426 pages (1034MB)
    In-use space: 1 pages ( 0%)
    Free space: 132425 pages ( 99%)


Total swap allocation:
    Allocated space: 132426 pages (1034MB)
    Reserved space: 105891 pages ( 79%)
    In-use space: 1 pages ( 0%)
    Available space: 26535 pages ( 20%)

root#vmstat 5 20


               \\|//
               (o -)
~~~~~~~~~~~oOOo~(_)~oOOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 Robert K. Kubarych,
 Asst. Director of Systems Admin. & Programming
 Rockland Community College
 Suffern, NY 10901
 Phone: (914) 574-4799

 Machine: DEC Alpha 4100 Phone: (914) 574-4799
 OS: CU 4.0F Fax (914) 574 - 4354
 Unidata Version: UDT 3.3.2-64
 Colleague Versions: 16
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Tue Aug 31 1999 - 19:57:32 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT