[Debian-eeepc-devel] Newbie experience

Karl O. Pinc kop at meme.com
Fri Mar 7 05:06:45 UTC 2008


On 03/06/2008 02:32:28 PM, Eric Cooper wrote:
> On Thu, Mar 06, 2008 at 10:42:05AM -0600, Karl O. Pinc wrote:
> >
> > On 03/06/2008 06:09:33 AM, Ben Armstrong wrote:
> >
> > > This is likely not clear because unless you're doing hibernate
> (which
> > > in my opinion is a frill that most people can do without) you
> don't
> > > need swap at all.

> > Another candidate would be entire applications that are
> > started and then sit unused for long periods of time.

> That's basically what Linux does already with the buffer cache.
> Unmodified pages that contain file contents (programs or data) are
> simply reused (not swapped out) whenever programs need more RAM,
> because they can always be read back in from the filesystem when
> needed.

That was kinda where I started from.  Arn't the code segments of
programs modified by the loader?  And application data, once modified,
is no longer associated with file content, right?  I wouldn't think the
apps would, as a general practice, e.g, mmap their modified
but as yet unsaved document content to a file.  Do they?

Of course you're right.  Given enough RAM you don't need
swap.  But that's just buying more RAM than you need, at
least when it comes to the RAM used by code segments that
are almost never needed.  (E.g. the code that drives
the spash screen, or all the config screens.)
Could be those code segments
are insignificant, but the 90/10 heuristic tells me that
this could be 90% of all code segments, which sounds
like it could be significant.

Data segments on the other hand are prime candidates
for the buffer cache.  But I don't know just how
much of a typical program is code and how much data.
Regardless there's some data, so it's not like having
swap will save 90% of all RAM used to store program
binaries (code + data segments).

I suppose it could come down to saying that RAM is cheap
these days.  But then setting up a swap partition's pretty
easy, and provides insurance against the out of memory
killer when, like me, you do something stupid that happens to use
a lot of RAM.

Karl <kop at meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein



More information about the Debian-eeepc-devel mailing list