Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mysql:tunning [2007/03/18 23:21] a created |
mysql:tunning [2011/01/01 19:16] (current) a |
||
---|---|---|---|
Line 10: | Line 10: | ||
* **'' | * **'' | ||
* **'' | * **'' | ||
+ | |||
+ | ===== 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 | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | 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 ==== | ||
+ | |||
+ | |||
+ | * download mysqltuner.pl or tuning-primer.sh and run them. While they won't give you exactly same recommendations it will give you nudge into right direction. | ||
+ | * set **'' | ||
+ | * use **Maatkit** or more specifically '' | ||
+ | |||
+ | $ wget maatkit.org/ | ||
+ | $ perl mk-query-digest --processlist localhost --interval 0.01 | ||
+ | |||
+ | ==== Tune Linux ==== | ||
+ | |||
+ | |||
+ | * turn off readhead | ||
+ | |||
+ | hdparm -a 0 /dev/sdb | ||
+ | |||
+ | * use noop or deadline scheduler for block device on which is logical volume with MySQL | ||
+ | |||
+ | echo deadline > / | ||
+ | |||
+ | * reduce swappiness | ||
+ | |||
+ | echo 0 > / | ||
+ | |||
+ | * disable write barriers (only with battery backed controller!) | ||
+ | |||
+ | mount /mnt/koha -o remount, | ||
+ | |||
+ | |||
+ | **Optimization links:** | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||