On this day, 13-March-2007 10:30 PM,  Duncan wrote:
So in summary, four reasons to keep swap enabled:

1) Old kernels needed it for memory zone management. (N/A for a decently modern kernel, say 2.6.16 or newer.)

2) Memory mapped file flexibility.

3) tmpfs based PORTAGE_TMPDIR and friends is generally a MUCH more efficient use of several gigs of memory than turning off swap, but until you have I'd say 6 gigs memory minimum, you'll want to keep swap enabled if you do it.

4) Suspend to disk, aka hibernate, uses swap.

#3 and possibly #4 are the important ones.

OTOH, disabling swap entirely, by turning off that config option in kernel setup before compiling it, DOES significantly simplify kernel code and memory management. This was in fact the reason I had it off back when I had only a gig of memory. I had system stability issues due to unstable memory hardware (cheap memory) at the time, and I figured the less complicated kernel memory management was, the more stable the system was likely to be. I don't know if it made much of a difference, but it definitely wasn't LESS stable. (The memory zone issues did apply back then, but my hardware simply wasn't stable enough for that to be much of an issue.)

Thank you to all for advising on the swap issue. The information is very useful and has helped me to make a decision. I am happy.

For the record, I am going with swap file of 4g.

Once again thank you all for the advice.

P.V.Anthony

--
gentoo-amd64@gentoo.org mailing list

Reply via email to