Re: Swapper problems?
On Mon, Aug 24, 2009 at 06:43:34PM -0400, Jason Edgecombe wrote:
> I was confused and angry the first time I found this out because I had
> some multi-user systems crash multiple times because of this. The
> default (overcommit_memory=0 ) is not sane and will happily allow more
> memory to be allocated than exists in RAM+swap.
This isn't as insane as it sounds (although yes, it can cause problems
sometimes). The real target of your rage are programs like the JVM and (to
a lesser extent) Apache, which allocate great gobs of memory up-front and
then often never use most of it. This is the reason why overcommit *can*
make a lot of sense -- better utilisation of available resources on the
basis that most of what programs ask for will never actually be used.
Of course, the alternate solution (great honking gobs of swap) makes a lot
more sense, but there's plenty of FUD out there about the great evils of
swap, and people seem awfully keen on minimising the amount of swap they
allocate, for no good reason (it's not as though disk space is expensive...)