Difference between revisions of "MySQL Tunning"

From OpenKM Documentation
Jump to: navigation, search
Line 13: Line 13:
 
* JVM settings for JBoss: -Xms 3072 -Xmx 3072 -XX:PermSize=256m -XX:MaxPermSize=512m
 
* JVM settings for JBoss: -Xms 3072 -Xmx 3072 -XX:PermSize=256m -XX:MaxPermSize=512m
 
* Repository is 1GB
 
* Repository is 1GB
 +
  
 
'''MySQL my.ini changes'''
 
'''MySQL my.ini changes'''
Line 24: Line 25:
 
The most important parameters are: '''innodb_buffer_pool_size''', '''innodb_additional_mem_pool_size''', '''innodb_log_file_size''' and '''innodb_log_buffer_size'''.
 
The most important parameters are: '''innodb_buffer_pool_size''', '''innodb_additional_mem_pool_size''', '''innodb_log_file_size''' and '''innodb_log_buffer_size'''.
 
According to database experts, '''innodb_buffer_pool_size should occupy the 70 percent of RAM of a dedicated database server'''!!!
 
According to database experts, '''innodb_buffer_pool_size should occupy the 70 percent of RAM of a dedicated database server'''!!!
 
  
 
{{Note|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}}
 
{{Note|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}}

Revision as of 13:26, 12 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:


CASE 1

Server information

  • Virtualized Windows Server 2008
  • CPU: Intel Xeon X3470 @2,93GHz
  • RAM: 7GB
  • JVM settings for JBoss: -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 and innodb_log_buffer_size. 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]