Tuning MySQL for OpenCATS

General discussion of OpenCATS

Moderators: RussH, cptr13

Forum rules
Just remember to play nicely once you walk through the door. You can disagree with us, or any other commenters in this forum, but keep comments directed to the topic at hand.
Post Reply
User avatar
RussH
Site Admin
Posts: 781
Joined: 12 Apr 2008, 08:28
what is two(2) plus three(3) ?: 5
Location: UK
Contact:

Tuning MySQL for OpenCATS

Post by RussH » 20 Mar 2015, 14:08

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.
RussH

Report your issues and feature requests;
https://github.com/opencats/opencats/issues

Please CLICK THE TICK to accept the answer!

Post Reply