Page 1 of 1

Tuning MySQL for OpenCATS

Posted: 20 Mar 2015, 14:08
by RussH
OpenCATS, as with all LAMP apps benefits from some tuning of your MySQL configuration. For example - by default the my.cnf config file on CentOS is largely empty, with most caching disabled.
-> Query cache will be disabled
-> Thread cache will be disabled

A good start is to run mysql tuner to see what it recommends - http://mysqltuner.com/ Recommednations will vary on your server, based upon processor size and installed memory.

Finally - if you're seeing fragmentation reported for your mysql database, schedule a cronjob to defragment it nightly;

Automating mysql defragmentation using cron

You can run mysqlcheck using cron automatically.

Open your crontab -e and add following line in it:

0 4 * * * mysqlcheck -Aos -u USER -pPASS > /dev/null 2>&1

Above will run mysqlcheck daily at 4AM.