Tuning MySQL my.cnf? Avoid this common pitfall!

Originally published at: Tuning MySQL my.cnf? Avoid this common pitfall!

It took me some time to decide on the title of this article. MariaDB has been fast replacing MySQL as many Linux distributions now default to MariaDB over MySQL. MariaDB is an enhanced drop-in replacement for MySQL. Therein lies my predominantly self-made conundrum, MySQL or MariaDB? The MySQL tuning advice below applies to MySQL, MariaDB…

I remember read this on the main website a while back. It was very helpful and I’ve kept the buffer sizes low ever since.

Another great resource is MariaDB’s knowledgebase. Not just for understanding what each variable does, but for tuning tips as well.

A couple of tuning questions for you.

What do you think of query_cache these days? Is it even useful anymore? I see mixed answers about this?

For a web server with 50+ WordPress websites, what about thread handling? Should I be setting a pool size or using pool of threads?

Query cache is deprecated as of MySQL 5.7.20 and is removed in MySQL 8. You are better off disabling query_cache completely now.