mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James A Sutherland <jas88@cam.ac.uk>
To: Charles Marslett <cmarslett9@cs.com>
Cc: war <war@starband.net>, linux-kernel@vger.kernel.org
Subject: Re: Swap vs No Swap.
Date: Fri, 23 Nov 2001 09:13:49 +0000	[thread overview]
Message-ID: <E167CP4-00049I-00@mauve.csi.cam.ac.uk> (raw)
In-Reply-To: <3BFC5A9B.915B77DF@starband.net> <E166wPI-0005yT-00@mauve.csi.cam.ac.uk> <3BFDECF2.CAE1ECC7@cs.com>
In-Reply-To: <3BFDECF2.CAE1ECC7@cs.com>

On Friday 23 November 2001 6:30 am, Charles Marslett wrote:
> James A Sutherland wrote:
> > On Thursday 22 November 2001 4:00 pm, war wrote:
> > > Incorrect, my point is I have enough ram where I am not going to run
> > > out for the things I do.
> >
> > There's more to it than "not run out". You have some fixed amount of RAM;
> > if the VM is working properly, adding swap will IMPROVE performance,
> > because that fixed amount of RAM is used more efficiently.
> >
> > Obviously, there are cases where removing swap breaks the system
> > entirely, but even in other cases, adding swap should *never* degrade
> > performance. (In theory, anyway; in practice, it still needs tuning...)
> >
> > > Using swap simply slows the system down!
> >
> > In which case, the VM isn't working properly; it SHOULD page out
> > infrequently used data to make more room for caching frequently used
> > files.
> >
> > James.
>
> I disagree.  It is true that a VM could be designed sufficiently complex
> that it would properly analyze every possible sequence of execution and
> have perfect prescience.  It would probably take a few hundred gigabytes of
> table structure to do that and that in itself will slow down the VM just
> scanning those tables, I dare say.

That wasn't quite what I had in mind :)

> In short, no VM is going to work perfectly -- it is extrapolating a model
> of behavior to a real world sequence of events and as such there will
> always be some real world set of programs and events that will make it
> worse than some other model of behavior (VM), including the one that never
> pages at all.  We just want that to happen rarely (whatever that means).

Yes, sometimes you'll get better behaviour in a specific case by "disabling" 
swap (i.e. forcing the kernel to page code instead), which in other cases 
causes nasty disk thrashing. In this case, though, I think the VM could do a 
much better job than it does presently; I've a feeling Rik's would perform 
better in this case, for example...

> A VM that is working properly is one that satisfies the beholder (sort of
> like beauty).  And in fact, if you look at the various similar discussions
> on Microsoft newsgroups (sorry ;-), you may notice they don't seem to be
> able to come up with a mechanism that handles large uniform access working
> sets and still works well with "normal" (highly peaked) working sets.  So I
> doubt it is an easy problem.

Nobody said VM coding was easy - or that Microsoft had got it right :)


James.

  reply	other threads:[~2001-11-23  9:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-22  1:53 war
2001-11-22  2:23 ` Joel Jaeggli
2001-11-22  2:31   ` war
2001-11-22  2:58 ` Mark Hahn
2001-11-22  4:09 ` listmail
2001-11-22  5:24 ` H. Peter Anvin
2001-11-22  5:30   ` war
2001-11-22  5:32     ` H. Peter Anvin
2001-11-22  9:50       ` Christian Bornträger
2001-11-22  8:50 ` Rik van Riel
2001-11-22 11:00 ` James A Sutherland
2001-11-22 16:00   ` war
2001-11-22 16:08     ` James A Sutherland
2001-11-22 16:57       ` Rik van Riel
2001-11-22 18:56         ` François Cami
2001-11-22 18:58           ` James A Sutherland
2001-11-22 19:17             ` François Cami
2001-11-22 19:36               ` G . Sumner Hayes
2001-11-22 20:37                 ` James A Sutherland
2001-11-23  6:30       ` Charles Marslett
2001-11-23  9:13         ` James A Sutherland [this message]
2001-11-23 16:46           ` Charles Marslett
2001-11-22 16:25   ` war
2001-11-22 16:37     ` Ryan Cumming
2001-11-22 17:39     ` James A Sutherland
2001-11-22 17:56       ` war
     [not found] ` <01112211150302.00690@argo>
2001-11-22 16:01   ` war
2001-11-22 16:12     ` James A Sutherland
2001-11-22 16:36       ` war
2001-11-22 16:33         ` Bjorn Wesen
2001-11-22 17:37         ` Thomas S. Iversen
2001-11-22 21:18           ` Mike Galbraith
2001-11-22 17:41         ` James A Sutherland
2001-11-22 17:56           ` war
2001-11-22 18:08             ` James A Sutherland
2001-11-23 22:05     ` Daniel Gryniewicz
2001-11-22 16:11 Elgar, Jeremy
2001-11-22 16:22 ` Ryan Cumming
2001-11-22 16:22 ` Stephan von Krawczynski
2001-11-22 16:29 Elgar, Jeremy
     [not found] <Pine.LNX.4.10.10111221006010.29736-100000@coffee.psychology.mcmaster.ca>
2001-11-22 16:34 ` war
2001-11-26 20:18   ` Kent Borg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E167CP4-00049I-00@mauve.csi.cam.ac.uk \
    --to=jas88@cam.ac.uk \
    --cc=cmarslett9@cs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=war@starband.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®