Table of Contents

MySQL tunning

See also:

3 Minute MySQL (tuning)

How to enable performance_schema in MySQL 5.5

One of the cool feature of MySQL 5.5 performance schema is not enabled by default to enable it in the my.cnf for linux add variable under mysqld

 [mysqld]
 performance_schema

to check if the performance_schema

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

Tune MySQL parameters

 $ wget maatkit.org/get/mk-query-digest
 $ perl mk-query-digest --processlist localhost --interval 0.01

Tune Linux

    hdparm -a 0 /dev/sdb
    echo deadline > /sys/block/sdb/queue/scheduler
    echo 0 > /proc/sys/vm/swappiness
    mount /mnt/koha -o remount,nobarrier

Optimization links: