5 ms·
I may be fundamentally misunderstanding something here, but doesn't turning off swap pretty much guarantee that things will start failing if you have a spike in
by tghw 16y ago
I may be fundamentally misunderstanding something here, but doesn't turning off swap pretty much guarantee that things will start failing if you have a spike in memory usage? Assuming you have something like 256M of RAM (like many small VPSs) running at 170M means that a relatively small spike could cause things to start having memory errors. Is there some way to mitigate this, other than enabling swap?
- jacquesm 16y agoSize your server properly and know the memory requirements of your application. That way you can guarantee that you will never hit swap.
- spudlyo 16y agoThat's a lot easier said than done. Unless you use ulimit to strictly enforce process memory limits (tricky) it's nearly impossible to know the how much memory a large complicated program (like MySQL) will allocate.
- derefr 16y agoThings will start "failing" from a user's perspective if you have to hit the disk for every transaction anyway (i.e. most requests will time out.)
- retube 16y agoWith no swap OOM Killer will kick in if you run out of RAM. It will kill a process in order to free up memory.