Questions? Feedback? powered by Olark live chat software
Knowledgebase
Author Avatar

MySQL Optimisation

Written by: on 30 May 2016 07:41 PM 30 May 2016 07:41 PM

This tutorial explains how to optimize MySQL performance including configuring, tuning & measuring performance. Read to learn today.

If you are running a MySQL database back end for your site, or using products such as Magento or Joomla, you can optimise MySQL to use query caching. This can speed up the site quite substantially.

To do this:

SSH into your server (for help see: https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh)

Type:

nano /etc/my.cnf

Find and modify (or add) the lines:

query_cache_limit=8M
query_cache_size=64M
query_cache_type=1

Save and exit (ctrl-x)

A cache size value of between 64mb and 256mb is recommended. If you have only 1GB of RAM we don't recommend setting this above 64mb.

You will need to restart MySQL after making this change, to do this type: /etc/init.d/mysqld restart

 

(0 vote(s))
Helpful
Not helpful