On Fri, 4 Sep 2009, Phil Pennock wrote: > On 2009-09-04 at 12:27 -0700, [email protected] wrote: >> for historical reasons (since it used to be the limit on swap partition >> size), I have fallen in the habit of creating a 2G swap partition on all >> my systems. If I was going to change it I would probably shrink it down >> (by the time a system is using 512M to 1G of swap, it's probably slowed to >> unusuable levels anyway and so I would just as soon have the system crash >> so that my clustering HA solution can kick in instead) > > While I mostly agree about the limited utility of swap, on FreeBSD I > still went (go, on my personal box) for swap >= RAM for one simple > reason: kernel crash dumps.
good point. another use is suspend-to-disk (on linux at least that writes to swap unless you work hard to send it elsewhere) under linux there are ways to send a crash dump to an unused partition (and given that setting up the crash dump is work in the first place, it's not much more work to send them elsewhere) > If you want to be able to figure out *why* a kernel has fubar'd, it's > good to be able to get a crash dump and since the swap partition is used > for writing that out, you need enough swap to hold the contents of RAM. > > I've debugged a few issues this way. Given the tendency of the awkward > problems to only show up in production systems, no matter *how* good > your staging and load test environments, I'd be very loath to give it > up. > > I tend to peruse Linux Weekly News to keep vaguely up-to-date on what's > going on in Linux kernel work and I understand that there's a project > working on Linux kernel crash dumps too. A search engine yielded: > http://lkcd.sourceforge.net/ > > So, given that you're unlikely to be using all the disk on the systems, > it might be worth creating the swap partition, even if you don't enable > it now, so that two years from now you don't need to sort out > re-partitioning across your cluster so that you can get the dumps to > debug the strange problem that keeps killing nodes. it all depends on what you are using for disks. I have some systems with 144G of disk and 128G of ram. I definantly won't be doing it there (and I won't spend the extra money on more disks just for swap), this system uses 2.5" SAS drives, so adding more or larger capacity drives is not that cheap. David Lang _______________________________________________ Tech mailing list [email protected] http://lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/
