Added few innodb_* options
Added possibility to set:
- innodb_io_capacity
- innodb_io_capacity_max
- innodb_flush_neighbors
Change-Id: I5038366282eb9cecbda17180ba43231d79c052ed
Related-Prod: PROD-36083
diff --git a/README.rst b/README.rst
index 9f17ac0..7a8eab0 100644
--- a/README.rst
+++ b/README.rst
@@ -185,6 +185,12 @@
Default is ``true``
- ``galera_error_log_path``
Default is ``/var/log/mysql/error.log``
+- ``galera_innodb_io_capacity``
+ Default is ``500``
+- ``galera_innodb_io_capacity_max``
+ Default is ``2000``
+- ``galera_innodb_flush_neighbors``
+ Default is ``1``
When the following parameters are set to 0, theirs
defaults will be calclulated automatically based on number
@@ -207,6 +213,9 @@
galera_xtrabackup_parallel: 2
galera_error_log_enabled: true
galera_error_log_path: /var/log/mysql/error.log
+ galera_innodb_io_capacity: 500
+ galera_innodb_io_capacity_max: 2000
+ galera_innodb_flush_neighbors: 1
Usage
=====
diff --git a/galera/files/my.cnf b/galera/files/my.cnf
index a8e8a02..b27b486 100644
--- a/galera/files/my.cnf
+++ b/galera/files/my.cnf
@@ -58,7 +58,13 @@
{% set threads_default = [grains.num_cpus * 2, 12] | sort | first %}
innodb_read_io_threads={{ service.innodb_read_io_threads if service.innodb_read_io_threads != 0 else threads_default }}
innodb_write_io_threads={{ service.innodb_write_io_threads if service.innodb_write_io_threads != 0 else threads_default }}
-innodb_io_capacity=500
+innodb_io_capacity={{ service.get('innodb_io_capacity', 500) }}
+{%- if service.innodb_io_capacity_max is defined %}
+innodb_io_capacity_max={{ service.innodb_io_capacity_max }}
+{%- endif %}
+{%- if service.innodb_flush_neighbors is defined %}
+innodb_flush_neighbors={{ service.innodb_flush_neighbors }}
+{%- endif %}
innodb_flush_log_at_trx_commit=2
innodb_flush_method=O_DIRECT
innodb_doublewrite=0
diff --git a/galera/files/my.cnf.init b/galera/files/my.cnf.init
index c062b3f..2c6070a 100644
--- a/galera/files/my.cnf.init
+++ b/galera/files/my.cnf.init
@@ -46,7 +46,13 @@
innodb_log_file_size=627M
innodb_read_io_threads={{ service.get('innodb_read_io_threads', 8) }}
innodb_write_io_threads={{ service.get('innodb_write_io_threads', 8) }}
-innodb_io_capacity=500
+innodb_io_capacity={{ service.get('innodb_io_capacity', 500) }}
+{%- if service.innodb_io_capacity_max is defined %}
+innodb_io_capacity_max={{ service.innodb_io_capacity_max }}
+{%- endif %}
+{%- if service.innodb_flush_neighbors is defined %}
+innodb_flush_neighbors={{ service.innodb_flush_neighbors }}
+{%- endif %}
innodb_flush_log_at_trx_commit=2
innodb_flush_method=O_DIRECT
innodb_doublewrite=0
diff --git a/metadata/service/master/cluster.yml b/metadata/service/master/cluster.yml
index e66c3ae..7127e99 100644
--- a/metadata/service/master/cluster.yml
+++ b/metadata/service/master/cluster.yml
@@ -18,6 +18,9 @@
galera_xtrabackup_parallel: 0
galera_error_log_enabled: true
galera_error_log_path: /var/log/mysql/error.log
+ galera_innodb_io_capacity: 500
+ galera_innodb_io_capacity_max: 2000
+ galera_innodb_flush_neighbors: 1
galera:
master:
enabled: true
@@ -47,6 +50,9 @@
xtrabackup_parallel: ${_param:galera_xtrabackup_parallel}
error_log_enabled: ${_param:galera_error_log_enabled}
error_log_path: ${_param:galera_error_log_path}
+ innodb_io_capacity: ${_param:galera_innodb_io_capacity}
+ innodb_io_capacity_max: ${_param:galera_innodb_io_capacity_max}
+ innodb_flush_neighbors: ${_param:galera_innodb_flush_neighbors}
mysql:
server:
users:
diff --git a/metadata/service/master/single.yml b/metadata/service/master/single.yml
index fc5ca23..76d6872 100644
--- a/metadata/service/master/single.yml
+++ b/metadata/service/master/single.yml
@@ -18,6 +18,9 @@
galera_wsrep_slave_threads: 0
galera_xtrabackup_parallel: 0
galera_error_log_path: /var/log/mysql/error.log
+ galera_innodb_io_capacity: 500
+ galera_innodb_io_capacity_max: 2000
+ galera_innodb_flush_neighbors: 1
galera:
master:
enabled: true
@@ -43,6 +46,9 @@
xtrabackup_parallel: ${_param:galera_xtrabackup_parallel}
error_log_enabled: ${_param:galera_error_log_enabled}
error_log_path: ${_param:galera_error_log_path}
+ innodb_io_capacity: ${_param:galera_innodb_io_capacity}
+ innodb_io_capacity_max: ${_param:galera_innodb_io_capacity_max}
+ innodb_flush_neighbors: ${_param:galera_innodb_flush_neighbors}
mysql:
server:
users:
diff --git a/metadata/service/slave/cluster.yml b/metadata/service/slave/cluster.yml
index 991db2a..166c235 100644
--- a/metadata/service/slave/cluster.yml
+++ b/metadata/service/slave/cluster.yml
@@ -18,6 +18,9 @@
galera_xtrabackup_parallel: 0
galera_error_log_enabled: true
galera_error_log_path: /var/log/mysql/error.log
+ galera_innodb_io_capacity: 500
+ galera_innodb_io_capacity_max: 2000
+ galera_innodb_flush_neighbors: 1
galera:
slave:
enabled: true
@@ -47,6 +50,9 @@
xtrabackup_parallel: ${_param:galera_xtrabackup_parallel}
error_log_enabled: ${_param:galera_error_log_enabled}
error_log_path: ${_param:galera_error_log_path}
+ innodb_io_capacity: ${_param:galera_innodb_io_capacity}
+ innodb_io_capacity_max: ${_param:galera_innodb_io_capacity_max}
+ innodb_flush_neighbors: ${_param:galera_innodb_flush_neighbors}
mysql:
server:
users: