Friday, February 27, 2015

Reduce memory consumption on MySQL 5.6

It's been a while since I come back to check MySQL configuration on my development machine. Just feel a bit surprised that it looks like running really big databases within there. When I restarted it, I noticed that MySQL takes over 500 MB in memory usage. Actually, I didn't even start Apache server which comes with XAMPP package.

Current version of MySQL is 5.6.16. Even I'm quite happy with the database performance, it would be nice to save some resources for the other development tools running in parallel, especially for the big Eclipse IDE.

As long as it's not running as production machine, I'm fine with reducing the memory footprint a bit, actually, quite a bit.

Find my.cnf or my.ini for running MySQL instance and add/change the line as follow:

[mysqld]
performance_schema = off
Have a restart for MySQL service and the memory consumption is dropped back to under 100 MB which is fantastic!

Note: The MySQL Performance Schema is a feature for monitoring MySQL Server execution at a low level. You can turn it back on anytime for performance tuning by setting "performance_schema = on".





No comments:

Post a Comment