Difference between revisions of "MySQL Tunning"
m (→Use Case) |
|||
Line 4: | Line 4: | ||
* http://dev.mysql.com/doc/refman/5.0/en/innodb-tuning.html | * http://dev.mysql.com/doc/refman/5.0/en/innodb-tuning.html | ||
* http://dba.stackexchange.com/questions/21209/innodb-high-disk-write-i-o-on-ibdata1-file-and-ib-logfile0 | * http://dba.stackexchange.com/questions/21209/innodb-high-disk-write-i-o-on-ibdata1-file-and-ib-logfile0 | ||
+ | * http://dev.mysql.com/doc/refman/5.1/en/query-cache.html | ||
== Use Case == | == Use Case == |
Revision as of 11:17, 15 September 2013
Take this documentation as is, not as a definitive guide to tunning MySQL. There're a lot of information and knowledge should be read before change MySQL configuration. The documentation has been created based on experice shared by OpenKM server administrator users.
Useful links should read:
- http://dev.mysql.com/doc/refman/5.0/en/innodb-tuning.html
- http://dba.stackexchange.com/questions/21209/innodb-high-disk-write-i-o-on-ibdata1-file-and-ib-logfile0
- http://dev.mysql.com/doc/refman/5.1/en/query-cache.html
Use Case
Server information
- Virtualized Windows Server 2008
- CPU: Intel Xeon X3470 @2,93GHz
- RAM: 7GB
- JVM settings for Tomcat: -Xms 3072 -Xmx 3072 -XX:PermSize=256m -XX:MaxPermSize=512m
- Repository is 1GB
MySQL my.ini changes
- innodb_buffer_pool_size=1792M
- innodb_additional_mem_pool_size=16M
- innodb_log_file_size=256M
- innodb_log_buffer_size=8M
Using MySQL server InnoDB engine with the default configuration parameters in my.ini file can cause a serious performance bottleneck in applications with high database read write activity. MySQL should have enough RAM to be able to cache the repository and avoid the high Disk I/O activity.
The most important parameters are:
- innodb_buffer_pool_size
- innodb_additional_mem_pool_size
- innodb_log_file_size
- innodb_log_buffer_size
According to database experts, innodb_buffer_pool_size should occupy the 70 percent of RAM of a dedicated database server!!! |
Considerations Repository is 1GB so 1792M is enough RAM for innodb_buffer_pool_size. The larger your repository is the more memory you need to allocate to innodb_buffer_pool_size. If you are using x86 mysql server you cannot allocate RAM larger than 2GB.
Information collected from OpenKM forum post.