Page 1 of 1

CPU and Memory Usage: Less usage settings for my.conf

Posted: Sat Feb 13, 2016 11:13 pm
by vdTOG
What settings for my.conf can help me to consume less CPU and lesse memory?

I am having problems with high cpu and high memory consumptions with mysqld.

Thank you

Re: CPU and Memory Usage: Less usage settings for my.conf

Posted: Tue Feb 16, 2016 4:44 am
by prupert
That entirely depends on your hardware and work load. Unfortunately there is no silver bullet solution. Some people dedicate their entire work to achieving the optimal settings for database servers. You could start at reading the documentation carefully, and read in on stuff like the Percona blog, but in your case you might just be better off when hiring a specialist.

http://www.mysql.com/why-mysql/performance/
https://www.percona.com/blog/
https://mariadb.com/kb/en/mariadb/confi ... rformance/

Re: CPU and Memory Usage: Less usage settings for my.conf

Posted: Tue Feb 16, 2016 10:00 pm
by faris
And be careful with tools like mysqltuner!

It can get you into a lot of trouble by recommending things that will help speed things up, but at the same time will consume massive amounts of memory.

tuning MySQL is really a pain, as it is always a balance between performance and memory usage.

Re: CPU and Memory Usage: Less usage settings for my.conf

Posted: Thu Feb 18, 2016 2:53 pm
by mikeshinn
tuning MySQL is really a pain, as it is always a balance between performance and memory usage.
Very true. In general the two are mutually exclusive. You cant have low memory usage and high performance, you have to make trade offs. Memory is fast, disks are slow. So in general the more you do in memory the fast the DB will be, the less you do in memory the slower.