Browse 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 7 years ago
parent
commit
162a4d44c1
2 changed files with 26 additions and 7 deletions
  1. +20
    -5
      README.rst
  2. +6
    -2
      galera/files/my.cnf

+ 20
- 5
README.rst View File

user: root user: root
password: pass 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 Usage
===== =====


MySQL Galera check sripts MySQL Galera check sripts


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


mysql> SHOW STATUS LIKE 'wsrep_cluster_size' ;" mysql> SHOW STATUS LIKE 'wsrep_cluster_size' ;"


.. code-block:: bash .. 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... OK, successfully used password, moving on...


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


Set root password? [Y/n] y Set root password? [Y/n] y
New password:
Re-enter new password:
New password:
Re-enter new password:
Password updated successfully! Password updated successfully!
Reloading privilege tables.. Reloading privilege tables..
... Success! ... Success!
Cleaning up... Cleaning up...


5. service mysql stop 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 7. start first node
8. Start third node which is connected to first one 8. Start third node which is connected to first one
9. Start second node which is connected to third one 9. Start second node which is connected to third one

+ 6
- 2
galera/files/my.cnf View File



innodb_file_format=Barracuda innodb_file_format=Barracuda
innodb_file_per_table=1 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_log_file_size=627M
innodb_read_io_threads=8 innodb_read_io_threads=8
innodb_write_io_threads=8 innodb_write_io_threads=8
innodb_doublewrite=0 innodb_doublewrite=0
innodb_autoinc_lock_mode=2 innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1 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_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_provider={{ service.wsrep_provider }}
wsrep_cluster_name="openstack" wsrep_cluster_name="openstack"

Loading…
Cancel
Save