[SLUG] LPI: Swap space size
Martin Webb
martin at webb.lcbroadband.co.uk
Wed Aug 17 12:27:52 BST 2005
john at johnallsopp.co.uk wrote:
>I'm reading this in the HOWTOs about how much disc swap space to
>create and it makes no sense, can anyone shed any light on it?:
>
>
The simplest and most honest answer to the question above is "No", I
can't answer those intricacies at any more precise level: so why am I
answering this query?
What I can suggest is that, when it comes to the time to answer the
questions, the questions themselves cannot be too specific, because
there are only rules of thumb (and there seem to be different sizes of
thumb), and different uses. I have seen:
- make your swap space the same size as RAM;
- make your swap space one and a half times the size of RAM;
- make your swap space twice the size of RAM.
The distributions I'm running at present make swap twice the size of RAM
(RAM 512MB, Swap 1024MB).
I envisage a question no more complex that: "You have 512MB of RAM, and
you have several applications open, each using large amounts of memory.
What size swap file would you suggest for this configuration?" To which
I would answer "Lots and lots, or 1536MB at most".
I think another important issue is that, if the PC seems to be slow,
labouring, doing more swapping than actual work, then the swap file is
too small.
I quite often look at the system monitor, and keep one open on one of
the desktops. It never shows more than a few k of swap used. This
seems wasteful of space on the disc, but with the size of today's discs,
a few percent of a meg against gigs of space doesn't matter much. It's
only going to be an issue if you're working with a 2 gig or less disc on
an old machine, and perhaps then there ought to be a well though out answer.
I shall look forward to more precise answers.
Martin
More information about the Scarborough
mailing list