Thanks to all who responded. Not only did I get that warm fuzzy feeling I
was searching for, but I ended up more knowledgeable on the subject. Not
a bad deal at all.
If I missed someone, I apologize. Thanks again. Responses and original
post are pasted below.
Rob
On Tue, 31 Aug 1999, John J. Francini wrote:
>
> Date: Tue, 31 Aug 1999 16:05:34 -0400
> From: "John J. Francini" <francini_at_progress.com>
> To: Robert Kubarych <rkubaryc_at_sunyrockland.edu>
> Subject: Re: changing of swap allocation mode
>
> >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
>
> yes, by all means go to deferred swap mode. Not only will your available
> swap space soar way up, but the system may actually be a bit faster since
> every memory allocation won't have the overhead of marking a page of swap
> as being allocated. (Yes, it's not actually marking it on disk as being
> allocated, but I've got to believe the code path through the memory
> allocation routines is probably shorter in deferred mode...)
>
> You may well find that you can even trim back the swap space allocated and
> recover the extra space on the disks for other uses...
>
> I've thought for some time that immediate-mode swap allocation is highly
> unrealistic in most environments.
>
> Just my thoughts,
>
> John Francini
> John Francini, francini_at_progress.com
> +---------------------------------------------------------------------------+
> | "I have come to the conclusion that one useless man is called a disgrace; |
> | that two or more are called a law firm; and that three or more become |
> | a Congress. And by God I have had _this_ Congress!" |
> | -- John Adams in "1776"|
> +---------------------------------------------------------------------------+
>
>
On Tue, 31 Aug 1999, Peter Elmer wrote:
>
> Date: Tue, 31 Aug 1999 22:09:13 +0200 (MET DST)
> From: Peter Elmer <peter.elmer_at_cern.ch>
> To: Robert Kubarych <rkubaryc_at_sunyrockland.edu>
> Subject: Re: changing of swap allocation mode
>
>
> Hello Robert,
>
> I had a similar situation and foudn that switching to deferred swap mode
> solved the problem.
>
> I think the only thing you need to be careful is if you really are using
> up all of the physical memory/swap and you have >many< large processes running
> on your machine. This can cause strange crashes if they all go for the vm
> they deferred getting at the same time. Deferred mode would be particularly
> approprite if you have a single large memory process running.
>
> good luck,
> Peter Elmer
>
>
>
> On Tue, 31 Aug 1999, Robert Kubarych wrote:
>
> > 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
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
>
>
> -------------------------------------------------------------------------
> Peter Elmer E-mail: Peter.Elmer_at_cern.ch Phone: +41 (22) 767-7365
> Address: CERN Division PPE, Bat. 32 RA-13, CH-1211 Geneva 23, Switzerland
> -------------------------------------------------------------------------
>
>
On Tue, 31 Aug 1999 alan_at_nabeth.cxo.dec.com wrote:
>
> Date: Tue, 31 Aug 1999 14:22:53 -0600
> From: alan_at_nabeth.cxo.dec.com
> To: Robert Kubarych <rkubaryc_at_sunyrockland.edu>
> Subject: Re: changing of swap allocation mode
>
>
> The important thing to remember about deferred mode is that
> if something needs to page or swap and there isn't anything
> space for it, some other process will be killed to make space
> for the one wanting to page/swap. If you're certain that there
> will never be a short fall of page/swap space or you don't care
> that idle processes die mysteriously, deferred mode is fine.
>
> If this is a general use system, switching to deferred mode
> opens the opportunity for a denial of service attack. A
> user or group of users can run very large programs to use
> up all the page/swap space causing other programs to die
> when their programs gets paged or swapped out. If you have
> users you trust or a very large stick with which to threaten
> their continued education/employment, this may not be an
> issue.
>
On Tue, 31 Aug 1999, Sloane, Bob wrote:
>
> Date: Tue, 31 Aug 1999 15:28:29 -0500
> From: "Sloane, Bob" <sloane_at_ukans.edu>
> To: 'Robert Kubarych' <rkubaryc_at_sunyrockland.edu>
> Subject: RE: changing of swap allocation mode
>
> [The following text is in the "windows-1252" character set]
> [Your display is set for the "US-ASCII" character set]
> [Some characters may be displayed incorrectly]
>
> Assuming that your work load never actually USES more than 1GB
> of swap space, you should be OK using defered mode. In fact,
> things should get better if you use deferred mode, since in
> immediate mode, you can't allocate more memory than you have swap
> space. In your case, you are limiting your system to a maximum of
> 1GB of memory in use because that is all the swap space you have.
> Should you decide to use immediate mode, you should allocate at
> least as much swap space as you have physical memory so that you
> can actually use all your physical memory.
> --
> Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
> sloane_at_ukans.edu http://www.ukans.edu/home/sloane Phone:(785)864-0444
>
>
On Wed, 1 Sep 1999, Gwen Pettigrew wrote:
>
> Date: Wed, 01 Sep 1999 10:24:19 +0100
> From: Gwen Pettigrew <gwen_at_itg.cam.ac.uk>
> To: Robert Kubarych <rkubaryc_at_sunyrockland.edu>
> Subject: Re: changing of swap allocation mode
>
> Hi Robert
>
> This is from the documentation.
>
>
> Selecting the Swap Space Allocation Method
>
> To determine which swap space allocation method is being used, check
> for the existence of a soft link
> named /sbin/swapdefault, which points to the primary swap partition.
> If the /sbin/swapdefault file
> exists, the system uses the immediate method of swap space allocation.
> To enable the deferred method,
> rename or delete this soft link.
>
> You may receive the following informational messages when you remove
> the /sbin/swapdefault file
> and when you boot a system that is using the deferred method:
>
> vm_swap_init: warning sbin/swapdefault swap device not found
> vm_swap_init: in swap over-commitment mode
>
> If the /sbin/swapdefault file does not exist and you want to enable
> the immediate method of swap
> allocation, become the root user and create the file by using the
> following command syntax:
>
> ln -s ../dev/rzxy /sbin/swapdefault
>
> The x variable specifies the device number for the device that holds
> the primary swap partition, and the y
> variable specifies the swap partition. Usually, the swap device number
> is the same as the boot device
> number, and the primary swap partition is partition b.
>
> You must reboot the system for the new method to take effec
>
> Robert Kubarych wrote:
> >
> > 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.
> >
> Big bit chopped
>
> >
> >
> >
>
>
> --
> Gwen Pettigrew
> Computer Officer
> Institute of Theoretical Geophysics
> Department of Earth Sciences
> Downing Street
> Cambridge
> CB2 3EQ
> UK
>
> Tel 01223 333464
>
> E-mail gwen_at_itg.cam.ac.uk
> W3 http://www.itg.cam.ac.uk/ITG/members/gwen/
>
\\|//
(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 Wed Sep 01 1999 - 17:49:56 NZST