-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Graydon wrote: > On 02/01/2011 11:24 AM, da...@lang.hm wrote: >> agreed, espcially because for every "Thou shall always..." there is going >> to be some situation where different constrainsts mean that the best thing >> to do for that particular situation is to violate the rule. >> >> In addition, some rules become incorrect over time (for example, "you must >> have swap = 2 x ram", there were *nix systems where this was a real limit, >> but today it's not nearly as clear) >> > That came up here the other day as I set up a DB server with 24Gb of > RAM. Boss asked me "Do we really need 48Gb of swap?" > I'm not sure what the general practice is these days, generally I'm > assuming 1Gb of Swap because all our boxes are 8Gb+ RAM. Yet to see one > swap out yet. A fascinating question, one that needs to be in our theoretical repository of best practice, at least with discussion of how to choose.
- From my experience, on Linux: You want to have some swap available, so that the kernel can page out unused bits, allowing the real RAM to be used for caching/buffering useful bits from disk (or real application memory usage). There are knobs for tuning just how swappy it will be ($SEARCH_ENGINE swappiness for more detail than you could ever hope for). On our file/print/general office servers, we were for a while only allocating 2GB of swap, for servers with 8GB+ of RAM, but found that the kernel would fairly aggressively use most of that, leaving not a lot of spare capacity for run-away situations. It also wasn't because there was any real memory pressure, it was just the kernel being helpful. However, it then meant we couldn't easily see (remotely, from graphs etc), actual memory pressure, which was unhelpful. We now aim for 1:1, to give the kernel space to play with to keep things optimal. I think 1:2 is probably excessive on current Linux kernels, but I don't have any hard evidence for that (which disturbs me) - -- Craig Miskell Senior Systems Administrator Opus International Consultants Phone: +64 4 471 7209 This is not an automated signature. I type this in to the bottom of every message. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAk1IhPgACgkQmDveRtxWqnag0gCeJUNRjGj8wtJKx/76S2Snhnip 4T0AnjJ+E3aCQEgmKVSz/bNSp0wgO+Ei =K7fb -----END PGP SIGNATURE----- _______________________________________________ Discuss mailing list Discuss@lists.lopsa.org https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss This list provided by the League of Professional System Administrators http://lopsa.org/