openstack-helm/mariadb/templates/etc/_tuning.cnf.tpl
Alan Meadows 0ca1a7942e Refactor mariadb chart
This is a major refactor of the mariadb chart.  A few things
are accomplished:

* The chart template layout is updated to match our keystone
chart, providing a more structure to the chart.

* The chart was updated to leverage StatefulSets, which requires
Kubernetes 1.5, and helm 2.1.0.

* The bootstrapping process was completely overhauled to support
the unique constraints of statefulsets, namely that they come up
one by one, needing the previous to be in a ready state before
the next is provisioned.

* The references to {{ .IP }} we removed and replaced with POD_IP
environmental passing and address binding was fixed in several
places for wsrep functionality.  This may explain several oddities
with the previous setup causing mysterious and intermittent
database consistency issues.
2016-12-15 17:20:47 -08:00

48 lines
1.4 KiB
Smarty

[mysqld]
user=mysql
max_allowed_packet=256M
open_files_limit=10240
max_connections=8192
max-connect-errors=1000000
## Generally, it is unwise to set the query cache to be larger than 64-128M
## as the costs associated with maintaining the cache outweigh the performance
## gains.
## The query cache is a well known bottleneck that can be seen even when
## concurrency is moderate. The best option is to disable it from day 1
## by setting query_cache_size=0 (now the default on MySQL 5.6)
## and to use other ways to speed up read queries: good indexing, adding
## replicas to spread the read load or using an external cache.
query_cache_size =0
query_cache_type=0
sync_binlog=0
thread_cache_size=16
table_open_cache=2048
table_definition_cache=1024
#
# InnoDB
#
# The buffer pool is where data and indexes are cached: having it as large as possible
# will ensure you use memory and not disks for most read operations.
# Typical values are 50..75% of available RAM.
# TODO(tomasz.paszkowski): This needs to by dynamic based on avaliable RAM.
innodb_buffer_pool_size=4096M
innodb_log_file_size=2000M
innodb_flush_method=O_DIRECT
innodb_flush_log_at_trx_commit=2
innodb_old_blocks_time=1000
innodb_autoinc_lock_mode=2
innodb_doublewrite=0
innodb_file_format=Barracuda
innodb_file_per_table=1
innodb_io_capacity=500
innodb_locks_unsafe_for_binlog=1
innodb_read_io_threads=8
innodb_write_io_threads=8
[mysqldump]
max-allowed-packet=16M