Преглед изворни кода

Add configuration options for my.cnf

The following configuration options added:

    galera_innodb_read_io_threads: 8
    galera_innodb_write_io_threads: 8
    galera_wsrep_slave_threads: 8
    galera_xtrabackup_parallel: 4
    galera_error_log_enabled: false

Change-Id: Id1185c3a38669c37dc88806b4e9955522629ce1c
Related-Bug: https://mirantis.jira.com/browse/PROD-16528
master
Dennis Dmitriev пре 6 година
родитељ
комит
2c5728953b
No account linked to committer's email address
8 измењених фајлова са 64 додато и 14 уклоњено
  1. +10
    -0
      README.rst
  2. +9
    -5
      galera/files/my.cnf
  3. +4
    -4
      galera/files/my.cnf.container
  4. +10
    -4
      galera/files/my.cnf.init
  5. +1
    -1
      galera/files/my.cnf.pre
  6. +10
    -0
      metadata/service/master/cluster.yml
  7. +10
    -0
      metadata/service/master/container.yml
  8. +10
    -0
      metadata/service/slave/cluster.yml

+ 10
- 0
README.rst Прегледај датотеку

@@ -139,6 +139,11 @@ Configurable soft parameters

- **galera_innodb_buffer_pool_size** - the default value is 3138M
- **galera_max_connections** - the default value is 20000
- **galera_innodb_read_io_threads** - the default value is 8
- **galera_innodb_write_io_threads** - the default value is 8
- **galera_wsrep_slave_threads** - the default value is 8
- **galera_xtrabackup_parallel** - the default value is 4
- **galera_error_log_enabled** - the default value is 'false'

Usage:
.. code-block:: yaml
@@ -146,6 +151,11 @@ Usage:
_param:
galera_innodb_buffer_pool_size: 1024M
galera_max_connections: 200
galera_innodb_read_io_threads: 16
galera_innodb_write_io_threads: 16
galera_wsrep_slave_threads: 8
galera_xtrabackup_parallel: 2
galera_error_log_enabled: true


Usage

+ 9
- 5
galera/files/my.cnf Прегледај датотеку

@@ -31,7 +31,11 @@ collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server=utf8
default-storage-engine=innodb
#log_error=/var/log/mysql/error.log
{%- if service.get('error_log_enabled', False) %}
log_error = /var/log/mysql/error.log
{%- else %}
#log_error = /var/log/mysql/error.log
{%- endif %}
skip-external-locking
skip-name-resolve
socket = /var/run/mysqld/mysqld.sock
@@ -49,8 +53,8 @@ innodb_file_format=Barracuda
innodb_file_per_table=1
innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
innodb_log_file_size=627M
innodb_read_io_threads=8
innodb_write_io_threads=8
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_flush_log_at_trx_commit=2
innodb_flush_method=O_DIRECT
@@ -61,7 +65,7 @@ wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host
wsrep_provider={{ service.wsrep_provider }}
wsrep_cluster_name="openstack"

wsrep_slave_threads=8
wsrep_slave_threads={{ service.get('wsrep_slave_threads', 8) }}
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
wsrep_node_address={{ service.bind.address }}
@@ -76,7 +80,7 @@ ssl-key={{ service.ssl.key_file }}
{% endif %}

[xtrabackup]
parallel=4
parallel={{ service.get('xtrabackup_parallel', 4) }}

[sst]
streamfmt=xbstream

+ 4
- 4
galera/files/my.cnf.container Прегледај датотеку

@@ -16,8 +16,8 @@ innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
innodb_flush_log_at_trx_commit=2
innodb_file_per_table=1
innodb_data_file_path = ibdata1:100M:autoextend
innodb_read_io_threads=8
innodb_write_io_threads=8
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_doublewrite=0
innodb_log_file_size=627M
@@ -59,7 +59,7 @@ wsrep_on=ON
wsrep_provider_options="gcache.size=512M; gmcast.segment=0"
wsrep_cluster_name="my_wsrep_cluster"
wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host}}{% if not loop.last %},{% endif %}{% endfor %}"
wsrep_slave_threads=8
wsrep_slave_threads={{ service.get('wsrep_slave_threads', 8) }}
wsrep_certify_nonPK=1
wsrep_max_ws_rows=131072
wsrep_max_ws_size=1073741824
@@ -77,6 +77,6 @@ wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
socket=/var/lib/mysql/mysql.sock

[xtrabackup]
parallel=4
parallel={{ service.get('xtrabackup_parallel', 4) }}
user={{ service.admin.user }}
password={{ service.admin.password }}

+ 10
- 4
galera/files/my.cnf.init Прегледај датотеку

@@ -34,12 +34,18 @@ max_allowed_packet=256M
query_cache_size=0
query_cache_type=0

{%- if service.get('error_log_enabled', False) %}
log_error = /var/log/mysql/error.log
{%- else %}
#log_error = /var/log/mysql/error.log
{%- endif %}

innodb_file_format=Barracuda
innodb_file_per_table=1
innodb_buffer_pool_size={{ service.innodb_buffer_pool_size }}
innodb_log_file_size=627M
innodb_read_io_threads=8
innodb_write_io_threads=8
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_flush_log_at_trx_commit=2
innodb_flush_method=O_DIRECT
@@ -51,7 +57,7 @@ wsrep_cluster_address="gcomm://"
wsrep_provider={{ service.wsrep_provider }}
wsrep_cluster_name="openstack"

wsrep_slave_threads=8
wsrep_slave_threads={{ service.get('wsrep_slave_threads', 8) }}
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth={{ service.admin.user }}:{{ service.admin.password }}
wsrep_node_address={{ service.bind.address }}
@@ -66,7 +72,7 @@ ssl-key={{ service.ssl.key_file }}
{% endif %}

[xtrabackup]
parallel=4
parallel={{ service.get('xtrabackup_parallel', 4) }}

[sst]
streamfmt=xbstream

+ 1
- 1
galera/files/my.cnf.pre Прегледај датотеку

@@ -23,7 +23,7 @@ thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
#log_error = /var/log/mysql/error.log
log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M
[mysqldump]

+ 10
- 0
metadata/service/master/cluster.yml Прегледај датотеку

@@ -10,6 +10,11 @@ parameters:
galera_server_admin_user: root
galera_max_connections: 20000
galera_innodb_buffer_pool_size: 3138M
galera_innodb_read_io_threads: 8
galera_innodb_write_io_threads: 8
galera_wsrep_slave_threads: 8
galera_xtrabackup_parallel: 4
galera_error_log_enabled: false
galera:
master:
enabled: true
@@ -30,6 +35,11 @@ parameters:
port: 4567
max_connections: ${_param:galera_max_connections}
innodb_buffer_pool_size: ${_param:galera_innodb_buffer_pool_size}
innodb_read_io_threads: ${_param:galera_innodb_read_io_threads}
innodb_write_io_threads: ${_param:galera_innodb_write_io_threads}
wsrep_slave_threads: ${_param:galera_wsrep_slave_threads}
xtrabackup_parallel: ${_param:galera_xtrabackup_parallel}
error_log_enabled: ${_param:galera_error_log_enabled}
mysql:
server:
users:

+ 10
- 0
metadata/service/master/container.yml Прегледај датотеку

@@ -5,6 +5,11 @@ parameters:
galera_server_admin_user: root
galera_max_connections: 20000
galera_innodb_buffer_pool_size: 3138M
galera_innodb_read_io_threads: 8
galera_innodb_write_io_threads: 8
galera_wsrep_slave_threads: 8
galera_xtrabackup_parallel: 4
galera_error_log_enabled: false
kubernetes:
control:
configmap:
@@ -32,6 +37,11 @@ parameters:
port: 4567
max_connections: ${_param:galera_max_connections}
innodb_buffer_pool_size: ${_param:galera_innodb_buffer_pool_size}
innodb_read_io_threads: ${_param:galera_innodb_read_io_threads}
innodb_write_io_threads: ${_param:galera_innodb_write_io_threads}
wsrep_slave_threads: ${_param:galera_wsrep_slave_threads}
xtrabackup_parallel: ${_param:galera_xtrabackup_parallel}
error_log_enabled: ${_param:galera_error_log_enabled}
mysql:
server:
users:

+ 10
- 0
metadata/service/slave/cluster.yml Прегледај датотеку

@@ -10,6 +10,11 @@ parameters:
galera_server_admin_user: root
galera_max_connections: 20000
galera_innodb_buffer_pool_size: 3138M
galera_innodb_read_io_threads: 8
galera_innodb_write_io_threads: 8
galera_wsrep_slave_threads: 8
galera_xtrabackup_parallel: 4
galera_error_log_enabled: false
galera:
slave:
enabled: true
@@ -30,6 +35,11 @@ parameters:
port: 4567
max_connections: ${_param:galera_max_connections}
innodb_buffer_pool_size: ${_param:galera_innodb_buffer_pool_size}
innodb_read_io_threads: ${_param:galera_innodb_read_io_threads}
innodb_write_io_threads: ${_param:galera_innodb_write_io_threads}
wsrep_slave_threads: ${_param:galera_wsrep_slave_threads}
xtrabackup_parallel: ${_param:galera_xtrabackup_parallel}
error_log_enabled: ${_param:galera_error_log_enabled}
mysql:
server:
users:

Loading…
Откажи
Сачувај