On Tue, Jan 27, 2009 at 11:48 AM, Micheal Espinola Jr
<[email protected]> wrote:
> My memory is failing me as to why the recommended minimum paging file is 1.5x
> RAM.  Why not 1x or 2x? Why 1.5x specifically?
>
> I'm almost positive I used to know why - but my google-fu and personal
> list archive are also failing me today.
>
> I'm interested because I've got a new junior subboardinate whom I'm
> trying to instill a general understanding of concepts with, along with
> the benefits of creating and using a personal reference database.
> Plus, I hate not knowing the "why" for something...  :-)
>
> Here are my current notes on paging file optimization:
>
> http://www.espinola.net/wiki/Paging_file_optimization
>
> Not detailed (yet), but they are to the point. Would anyone care to
> take a peek and tell me if I'm missing something?
>
> TIA!

Swap file size and implementation styles are OS-dependent, but
consider the following from the FreeBSD man page for tuning (man
tuning), plus a comment by the author of the man page:

    "You should typically size your swap space to approximately 2x main mem-
    ory.  If you do not have a lot of RAM, though, you will generally want a
    lot more swap.  It is not recommended that you configure any less than
    256M of swap on a system and you should keep in mind future memory expan-
    sion when sizing the swap partition.  The kernel's VM paging algorithms
    are tuned to perform best when there is at least 2x swap versus main mem-
    ory.  Configuring too little swap can lead to inefficiencies in the VM
    page scanning code as well as create issues later on if you add more mem-
    ory to your machine.  Finally, on larger systems with multiple SCSI disks
    (or multiple IDE disks operating on different controllers), we strongly
    recommend that you configure swap on each drive (up to four drives).  The
    swap partitions on the drives should be approximately the same size.  The
    kernel can handle arbitrary sizes but internal data structures scale to 4
    times the largest swap partition.  Keeping the swap partitions near the
    same size will allow the kernel to optimally stripe swap space across the
    N disks.  Do not worry about overdoing it a little, swap space is the
    saving grace of UNIX and even if you do not normally use much swap, it
    can give you more time to recover from a runaway program before being
    forced to reboot."
                                       --
Mat Dillon said, in his commentary on an email string on [email protected]:
   "The last sentence is probably the most important.  The primary reason why
   you want to configure a fairly large amount of swap has less to do with
   performance and more to do with giving the system admin a long runway
   to have the time to deal with unexpected situations before the machine
   blows itself to bits."


Kurt

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to