diff --git a/jobs/mysql/spec b/jobs/mysql/spec index 257b8817..3ecd74cd 100644 --- a/jobs/mysql/spec +++ b/jobs/mysql/spec @@ -58,6 +58,8 @@ properties: default: 65536 cf_mysql.mysql.innodb_buffer_pool_size: description: 'Optional, the size in bytes of the memory buffer InnoDB uses to cache data and indexes of its tables' + cf_mysql.mysql.innodb_buffer_pool_instances: + description: 'Optional, number of buffer pool instances for InnoDB used if innodb_buffer_pool_size > 1GB' cf_mysql.mysql.cluster_ips: description: 'List of nodes. Must have the same number of ips as there are nodes in the cluster' cf_mysql.mysql.max_heap_table_size: diff --git a/jobs/mysql/templates/my.cnf.erb b/jobs/mysql/templates/my.cnf.erb index afa1b9a9..bf501900 100644 --- a/jobs/mysql/templates/my.cnf.erb +++ b/jobs/mysql/templates/my.cnf.erb @@ -121,6 +121,9 @@ innodb_stats_persistent = OFF <% if_p('cf_mysql.mysql.innodb_buffer_pool_size') do |innodb_buffer_pool_size| %> innodb_buffer_pool_size = <%= innodb_buffer_pool_size %> <% end %> +<% if_p('cf_mysql.mysql.innodb_buffer_pool_instances') do |innodb_buffer_pool_instances| %> +innodb_buffer_pool_instances = <%= innodb_buffer_pool_instances %> +<% end %> <% if_p('cf_mysql.mysql.max_connections') do |max_connections| %> max_connections = <%= max_connections %>