From: Phil Farrell <farrell@pangea.stanford.edu>
To: "Daniel J. Potter" <djpotter@one.net>
Subject: Re: Swap: Deferred or Immediate?
Date: 1998/02/13 [thread overview]
Message-ID: <34E49FE2.2742@pangea.stanford.edu> (raw)
In-Reply-To: Pine.LNX.3.95.980213113030.8631B-100000@shell.one.net
Daniel J. Potter wrote:
>
> Hey there,
> Are there any significant performance differences b/w immediate and
> deferred swap modes? We are currently using immediate, but are having
> problems with OSF reporting less than 10% swap available. I have heard
> that switching to deferred mode could solve this problem.
As has been discussed many times in this group, switching to deferred
mode will most likely solve your problem of low available swap space,
but it may introduce another problem, that some of us consider more
serious.
In the deferred mode, the kernel only allocates swap space
when actually needed to page out memory, rather than pre-allocating
possible needs when the process starts, as is done in immediate mode.
This "raises the bar" on how far your swap space will "stretch".
However, if you ever do reach the limit of swap space, you get
a different, and potentially more serious, result with deferred
mode. In immediate mode, when you reach the limit of swap space,
the next NEW process that tries to start will fail. In deferred
mode, when you reach the limit, it will most likely be because
a new process is starting and the system wants to page out some
older process that is in a wait state. In that case, the page
will fail and the OLD process will die. This will be a RANDOM
old process.
Several DEC engineers have mentioned that the algorithm
for picking a process to swap out often picks on important
system background daemons, with the result that a simple
user process starting up when swap space is exhausted in
deferred mode has the side effect of forcing an important
system daemon like "inetd" (your network connection daemon) to die.
Personally, I would rather have the user get a "not enough memory"
message than have a random important system daemon die with bad
consequences for the whole system and lots of time wasted trying
to associate the resulting symptoms with the real cause, not to
mention dealing with all the frustrated other users who are
affected by the loss of a system daemon.
I want my systems to behave predictably, so I always use immediate
swap mode. Disks are cheap and well worth the savings in my time
and aggravation.
--
Phil Farrell, Computer Systems Manager
Stanford University School of Earth Sciences
farrell@pangea.stanford.edu
prev parent reply other threads:[~1998-02-13 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-02-13 5:00 Swap: Deferred or Immediate? Daniel J. Potter
1998-02-13 5:00 ` Michael Gros
1998-02-13 5:00 ` Phil Farrell [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox