try another color:
try another fontsize: 60% 70% 80% 90%
Devis Lucato

Mysql and swap file

So you’re running dedicated MySQL Linux box with plenty of memory, now the good question arises: should you have swap file enabled or disabled ? I’ve seen production successfully running on boxes both with and without swap file so it is not the question of you must do it this or that way but rather understanding advantages of both approaches in your environment.

The rationale behind disabling swap is what there is nothing you want to swap out on such box anyway and if you disable swap file kernel will not swap and possibly will be able to manage memory smarter knowing it does not need to look for pages to swap out or balance memory for reducing a cache or swapping something out.

And indeed if you run with swap disabled you would not have the issue of swapping happening on the box as there is just nowhere to swap.

So what is about enabled swap – if we assume the kernel is smart (as we did for second case) we will be able to save a bit of memory as there are some programs which are started but never never really used. These would be first valid candidates to swap out. Second if you have swap file you get a bit more flexibility. What happens if you miscounted something or there is a gotcha in your application and you ended up with a lots of connections creating large temporary tables and so MySQL running out of memory (and getting killed by kernel). It could not even be MySQL but some script cron script or something similar with same affect.

Full article: http://bit.ly/15i8rT