SUMMARY: Another Q. about memory and swap

From: Kjell Andresen <kjell.andresen_at_usit.uio.no>
Date: Wed, 12 Mar 1997 22:55:33 +0100 (MET)

My original posting:
------------------------
Hello!

Through experience I've used the thumbrule:

swap=(2.5 or 3) * total memory

On systems that does need swapping - typically on servers/workstations
with 64 Mb ram.

A heavilly loaded 400 server has know got 384 Mb (had 192 Mb).
I wonder if it need to have more swap than the 341 Mb it has now?

Swap allocation method is: /sbin/swapdefault.disabled


The answers:
------------------------

From: Olle Eriksson <olle_at_cb.uu.se>

Depends on what you are doing, for some applications it may be OK, for others
not. For example for OPEN-GL applications DEC recommends at least 400MB of
swap

From: Jim Belonis <belonis_at_dirac.phys.washington.edu>

Doesn't need more swap unless you run out (or have less than about
25% free at your worst times).

From: David_Hull <David_Hull_at_notes.pw.com>

According to the Digital UNIX 4.0 installation manual, swap space must be
greater than physical RAM.
It also says you must have a minimum of 128 MB swap space, no matter how much
RAM.

From: rioux_at_ip6480nl.ce.utexas.edu (Tom Rioux)

When using lazy swapping, if the OS runs out of swap space it kills other
processes until the required swap space is recovered; I suggest you add
swap space to the 3.0*memory value or higher.
From: alan_at_nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.)

When using the other page/swap allocation method, you want to
estimate peak virtual memory use and then have enough memory
and page/swap space to meet that need. If your virtual memory
use is stable and predictable, you can probably get pretty close
to having enough without wasting much.

From: stefan karlsson <stefan.karlsson_at_ihc.se>

To say that a swap space shall/should be is difficult since
it's the application that you are runing that should deside
if you need this much or even more.

I work some with CAD applications and they normaly recommend
350-400MB but if you are retriving large assemblies(kompletta
ritningar),you can get an messages that says swap space below
10% even if you have 700MB.

What you have to do is:
1) Get the recommendation from the software supplier.
If the supplier has well experiens of your enviroment
then they might say the "exact" swap space,if not,their
value*2(atleast) + OS + other tasks.

2)Monitor your system with swapon -s,when you think your
system is as heavily loaded it gets.

Soo the 3*memory is also a number used before X11 days,which
in turn takes quite a lot of memory.

Since you are runing lazy swap,beware,since the system doesn't
refuse to start an application even if the page/swap area is=20
full.

Summary:
Nobody can give you an value,sorry to say but it's the truth,only
you can.I have 64MB but only 159MB page/swap but I don't run any
sofisticated applications(netscape,xfig...).

-stefan
From: Paul David Fardy <pdf_at_morgan.ucs.mun.ca>

>Through experience I've used the thumbrule:
>
>swap=(2.5 or 3) * total memory

I'm pretty sure that somewhere in the early BSD docs (early 1980s)
there was written a formula: swap RELOP 4 * physical memory.
Some people have taken this to be gospel and many of them believe that
RELOP should be = or >=, but I believe that it should be <= and
that it's not gospel.

Here's my reasoning: If less that 1/4 of your virtual memory can be
supported in physical memory, then you're going to have significant
degradation of the system due to swapping. I think this should be
considered worst case, so your (2.5 or 3) should be reasonable
operating parameters.

But I think the formula is backwards and gives the wrong perspective.
I'd write it physical memory as the dependent variable.

    physical memory >= 1/4 your virtual memory needs -- a must
    physical memory >= 1/3 your virtual memory needs -- good
    physical memory >= 1/2 your virtual memory needs -- great

For example, we have an AlphaServer 4100 with 4Gbytes of RAM. If
physical memory determines swap, one might recommend 10 to 16 Gbytes of
swap. But we are only running 1 or 2 big jobs (>2Gbyte) and, generally,
our VM needs are actually met by physical memory. I prefer to feel very
happy to have so much physical memory rather than feeling I lack swap
space. Currently we have only 4 Gigabytes of swap with lazy allocation
(over 4 disks on two SCSI controllers).

I never said it was easy to determine your VM needs. It's a lot harder
for some than for others. We could fix our VM problems with a simple
"rm /local/bin/pine", but that wouldn't go over well with our users. :-)
(I'm not talking about the 4100.)

Paul Fardy
[I still haven't got used to "only 4 Gigabytes". :-)]
From: hawkeye_at_SpiritOne.com (Gary C. Jenkins)

You definitely want more swap than you have memory. Depending on the memory
usage, you may be able to reduce your swap to 1.5-2.0.


Kjell Andresen Systems administrator, University of Oslo, Norway
                Center for Information Technology Services and
                Department of Geophysics
Received on Wed Mar 12 1997 - 23:10:18 NZDT

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