As you may know, sometimes MySQL can be memory-hungry. Of course having data in memory is always better than disk… RAM is still much faster than any SSD disk.
This is the reason why we recommended to have the working set as much as possible in memory (I assume you are using InnoDB of course).
Also this why you don’t want to use Swap for MySQL, but don’t
forget that a slow MySQL is always better than no MySQL at all,
so don’t forget to setup a Swap partition but try to avoid using
it. In fact, I saw many people just removing the Swap partition…
and then OOM Killer did its job… and
mysqld is often
its first victim.
MySQL allocates buffers and caches to improve performance of database operations. That process is explained in details in the manual.
In this article series, I will provide you some …[Read more]