Parcourir la source

Make innodb_buffer_pool_size configurable

Usage:

  galera:
    master:
      innodb_buffer_pool_size: 1024M
    slave:
      innodb_buffer_pool_size: 1024M

If innodb_buffer_pool_size is not set then 35% of the available
ram will be allocated for the buffer pool.

Change-Id: Iaffa3f5b4ded8bc838f9d707916e360ed873c13b
pull/34/head
Kirill Bespalov il y a 7 ans
Parent
révision
162a4d44c1
2 fichiers modifiés avec 26 ajouts et 7 suppressions
  1. +20
    -5
      README.rst
  2. +6
    -2
      galera/files/my.cnf

+ 20
- 5
README.rst Voir le fichier

@@ -56,13 +56,28 @@ Galera cluster slave node
user: root
password: pass

InnoDB parameters
=================

- **innodb_buffer_pool_size** - the default value is 35% of the available ram

Usage:

.. code-block:: yaml

galera:
master:
innodb_buffer_pool_size: 1024M
slave:
innodb_buffer_pool_size: 1024M

Usage
=====

MySQL Galera check sripts

.. code-block:: bash
mysql> SHOW STATUS LIKE 'wsrep%';

mysql> SHOW STATUS LIKE 'wsrep_cluster_size' ;"
@@ -80,15 +95,15 @@ Galera monitoring command, performed from extra server

.. code-block:: bash

Enter current password for root (enter for none):
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
@@ -127,7 +142,7 @@ Galera monitoring command, performed from extra server
Cleaning up...

5. service mysql stop
6. uncomment all wsrep* lines except first server, where leave only in my.cnf wsrep_cluster_address='gcomm://';
6. uncomment all wsrep* lines except first server, where leave only in my.cnf wsrep_cluster_address='gcomm://';
7. start first node
8. Start third node which is connected to first one
9. Start second node which is connected to third one

+ 6
- 2
galera/files/my.cnf Voir le fichier

@@ -38,7 +38,12 @@ query_cache_type=0

innodb_file_format=Barracuda
innodb_file_per_table=1
innodb_buffer_pool_size=3138M
{%- if service.innodb_buffer_pool_size is not defined %}
{% set buffer_pool_size = '%.2fM'%(grains['mem_total']*0.35) %}
{%- else %}
{% set buffer_pool_size = service.innodb_buffer_pool_size %}
{%- endif %}
innodb_buffer_pool_size={{ buffer_pool_size }}
innodb_log_file_size=627M
innodb_read_io_threads=8
innodb_write_io_threads=8
@@ -48,7 +53,6 @@ innodb_flush_method=O_DIRECT
innodb_doublewrite=0
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1

wsrep_cluster_address="gcomm://{% for member in service.members %}{{ member.host}}:4567{% if not loop.last %},{% endif %}{% endfor %}/?pc.wait_prim=no"
wsrep_provider={{ service.wsrep_provider }}
wsrep_cluster_name="openstack"

Chargement…
Annuler
Enregistrer