Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Swap space theory
@ 1997-04-14 18:42 david l nicol
  0 siblings, 0 replies; only message in thread
From: david l nicol @ 1997-04-14 18:42 UTC (permalink / raw)


> On the contrary, there is an objective basis.  Just not for Linux.
> 
> BSD variants have long required that swap be at least twice the size of
> physical RAM.  This allowed kernel memory allocation code to make certain
> assumptions (that I don't recall).

It has to do with the scheme used for the swapping.  This is from
the Digital Unix swapon.8 man page:

  There are two strategies for swap space allocation: immediate mode and
  deferred or over-commitment mode.  The two strategies differ in the
point
  in time at which swap space is allocated.  If immediate mode is used,
swap
  space is allocated when modifiable virtual address space is created. 
If
  deferred mode is used, swap space is not allocated until the system
needs
  to write a modified virtual page to swap space.  Immediate mode is the
  default swap space allocation strategy.

  Immediate mode is more conservative than deferred mode because each
modifi-
  able virtual page is assigned a page of swap space when it is
created.  If
  you use the immediate mode of swap space allocation, you must allocate
a
  swap space that is at least as large as the total amount of modifiable
vir-
  tual address space that will be created on your system.  Immediate
mode
  requires significantly more swap space than deferred mode because it
  guarantees that there will be enough swap space if every modifiable
virtual
  page is modified.

  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
phy-
  sical 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.

_____________________________________________________________________
David Nicol (816) 235 1187  UMKC Network Operations: TACACS, News, perl,
  C, shell programming, Unix system administration,  problem solving.
    When I write poems at my desk / Thurber's who I try to -esque

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-04-14 18:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-14 18:42 Swap space theory david l nicol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox