
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] A Swap Question
On Mon, 5 Nov 2007, Daniel A. Ramaley wrote:
For new installs on new hardware (with 1GB or more RAM), i usually
allocate 1/2 GB swap. My rationale is that on a server if the swap is
being hit even that much than the battle is already lost; the machine
will be so busy swapping (rather than serving) that it is effectively
offline.
That may not always be true. The comments equating swap usage to bad
performance assume all the swap is being eaten up by one overzealous
process. In that case, you're likely going to feel the pain. But it really
does depend on exactly what you plan to do with the machine.
For example, it's not unusual for me to get into some gimp session with
several high-res photos loaded and then run out of time before I'm done.
Usually I just leave the process open but idle -- sometimes for days. In
that case, the gimp and all it's memory-hogging buffers can effectively be
swapped out so long as I have enough swap space. In the meantime I can use
the machine for other things -- with the same available RAM I would have
had without the gimp program loaded and no appreciable performance hits.
The more swap, the more of these elephantine programs I can have loaded
but idle before the performance starts to suffer.
If you never leave large-footprint programs open like that, I agree with
the comments so far. But, on the other hand, the first time you lose a few
hours work due to an out-of-memory condition you'll wonder whether saving
those few gigs of cheap disk was really worth it ;-)...
Besides, if I understand right, Linux uses unallocated swap pages as disk
cache buffers so a larger swap *may* equate to a slightly faster machine
even if you never load any large programs.
---
Joseph L (Joe) Larabell Never fight with a dragon
http://larabell.org for thou art crunchy
and goest well with cheese.
Home |
Main Index |
Thread Index