Page 1 of 1

Mysql optimisation.

Posted: 01 May 2014 02:57
by Michaelv
Hi All,

This is not a bug but a suggestion. Its not exactly a how to either :)

I noticed that mysql has caching turned on, but is query_cache_size=0 which effectively turns it off.
(This seems to be the default Centos distribution settings).

I would suggest starting off with (in my.cnf), assuming that you have enough memory. (16Mbyte for various cache should not cause memory issues)
query_cache_size=16777216
tmp_table_size=16777216
max_heap_table_size=16777216
thread_cache_size=32
query_cache_limit=1048576
table_open_cache=128

You may or may not need to increase this, depending on your actual mail load.
I would suggest using these tools to figure out your requirements.

MysqlTuner.pl
https://raw.githubusercontent.com/major ... qltuner.pl

And mysql tuning primer.
https://launchpad.net/mysql-tuning-primer

Regards,

Michael

Re: Mysql optimisation.

Posted: 01 May 2014 06:26
by buzzzo
And most important.. Switch to innodb engine.

Re: Mysql optimisation.

Posted: 01 May 2014 17:40
by shawniverson

Re: Mysql optimisation.

Posted: 22 Mar 2015 08:16
by pdwalker
Also recommended:

Code: Select all

[mysqld]
innodb_file_per_table=1
This creates a separate file for each innodb table, which allows you to optimize and shink them separately.