Difference between revisions of "MySQL Tunning"

From OpenKM Documentation
Jump to: navigation, search
m
(Use Case)
Line 6: Line 6:
 
* [http://dba.stackexchange.com/questions/21209/innodb-high-disk-write-i-o-on-ibdata1-file-and-ib-logfile0 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 InnoDB - High disk write I/O on ibdata1 file and ib_logfile0]
  
== Use Case ==
+
== User Case ==
 
'''Server information'''
 
'''Server information'''
 
* Virtualized Windows Server 2008
 
* Virtualized Windows Server 2008

Revision as of 11:28, 29 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:

User 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

Nota advertencia.png According to database experts, innodb_buffer_pool_size should occupy the 70 percent of RAM of a dedicated database server!!!


Nota clasica.png Before changing these values, please read MySQL documentation carefully. Before making any changes you should make sure that mysql server has been stopped correctly (check server log), otherwise the innodb will become corrupted and mysql server won't restart

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.