Swapping has always been something bad for MySQL performance but
it is even more important for HA systems. It is so important to
avoid swapping with HA that NDB cluster basically forbids calling
malloc after the startup phase and hence its rather complex
configuration.
Probably most readers of this blog know (or should know) about
Linux swappiness setting, which basically controls how important
is the file cache for Linux. Basically, with InnoDB, since the
file cache is not important we add “vm.swappiness = 0″ to
“/etc/sysctl.conf” and run “sysctl -p” and we are done.
Swappiness solves part of the swapping issue but not all. With
Numa systems, the picture is more complex and swapping can occur
because of a memory imbalance between the physical cpus, the
sockets and not cores. Jeremy Cole explained this here and …
[Read more]