How to Reduce MySQL’s Huge Memory Footprint
While investigating what was making my old laptop swap, I ended up wondering why MySQL is such a memory hog.
I mean, seriously… 450MB or so of RAM.
That is completely crazy by any standard for an idle process.
(Postgres, for comparison, is very happy with under 20MB when idle.)
A bit of googling later, adding the following line to the
my.cnf file trimmed it to a much more tolerable 35MB:
performance_schema = 0
(Naturally, don’t forget to re-enable it if you need it. It can be useful.)