On Wed, 20 Apr 2011, Luke S Crawford wrote: > Andrew Hume <[email protected]> writes: > >> i know, i know. this is an old chestnut. >> we used to have swap 2-3x main memory, >> but nowadays the wisdom is that that old rule >> is no longer applicable. (this is on RHE5.) >> so here i am, with a 128GB memory system with 16GB of swap. >> and here i am, killing the system by running it out of swap. >> >> my observation is that if i have large memory, i will use it. >> (to say nothing of memory leaks etc.) >> and if i have a few multiple large memory processes, >> why wouldn't i want swap sized at 2-3x memory? > > > So, here's a question. Have any of you tried turning off memory overcommit? > or turning it way down? it seems that would remove the worst problems > with the oom killer (of course, many things still don't properly > check the return of malloc, so it might not help as much as I think, > which is why I'm asking)
the impact of turning off overcommit depends a lot on what sort of apps you are running. if you are running fairly small apps it will have very little impact if you are running very large apps that fork to spawn small child processes, it can cause you to need significantly more memory (ram + swap) due to the temporary requirements when the large process forks (memory useage of the large app doubles when you fork, only to drop back down when it does the exec of the child) the other question to consider is the quality of coding on the apps you are running. if you have apps that really do error checking on every malloc call (and do something sane if they get an error), then moving the errors there will help you. however, the vast majority of software that's out there either doesn't do the checks, of just crashes the app if the allocation fails. In this case are you really better off? David Lang _______________________________________________ Tech mailing list [email protected] https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/
