Re:The MySQL “swap insanity” problem and the effects of the ...
by lawnchair_larry on Sunday April 08, 2012 @02:58PM
(#3814552)
Overcommit does not use or require swap. You can have overcommit enabled on linux and not be using swap at all.
Re:The MySQL “swap insanity” problem and the effects of the ...
by wmf on Sunday April 08, 2012 @03:27PM
(#3814649)
But then you may meet the OOM killer.
Re:The MySQL “swap insanity” problem and the effects of the ...
by lawnchair_larry on Sunday April 08, 2012 @07:26PM
(#3815223)
Again, that has nothing to do with swap being enabled.
Re:The MySQL “swap insanity” problem and the effects of the ...
by wmf on Sunday April 08, 2012 @10:33PM
(#3815594)
My understanding is that swap would delay or prevent the OOM killer from kicking in. Is that wrong?
Re:The MySQL “swap insanity” problem and the effects of the ...
by lawnchair_larry on Sunday April 08, 2012 @11:31PM
(#3815720)
If you have 8GB of ram and 8GB of swap, the OOM killer will kick in at 16GB.
If you have 16GB of ram, and 0GB of swap, the OOM killer will kick in at 16GB.
If they never modify those CoW pages, they can both happily keep using the same copy of the page in memory, and you can have two 1GB processes using a total of e.g. 1.01GB of real memory.
This is very useful in practice, but it means that the system needs the ability to over-commit memory allocations (allow CoW allocations etc., when there is no actual memory available to back it), and over-commit currently, and probably should, requires swap (some place to dump pages in case an over-committed allocation comes calling).