Skip to content

Commit

Permalink
Merge pull request #103 from eRadical/change-variables
Browse files Browse the repository at this point in the history
Removed:
  • Loading branch information
mrlesmithjr authored Dec 31, 2021
2 parents 8adc9b0 + 30d6a31 commit f0cf82b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 30 deletions.
18 changes: 0 additions & 18 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ mariadb_mysql_mem_multiplier: .25

mariadb_mysql_settings:
datadir: "/var/lib/mysql"
expire_logs_days: 10
#Default is 16M
key_buffer_size: "{{ (ansible_memtotal_mb | int * mariadb_mysql_mem_multiplier) | round | int }}M"
max_allowed_packet: "16M"
Expand All @@ -47,7 +46,6 @@ mariadb_mysql_settings:
query_cache_size: "16M"
# MariaDB default: https://mariadb.com/kb/en/server-system-variables/#thread_cache_size
thread_cache_size: 256
thread_stack: "192K"

# Define TLS certs & keys which will be used to encrypt mysql, WSREP, SST connections
# This variable should have defined exactly three items, any other item count is handled like none.
Expand Down Expand Up @@ -199,12 +197,6 @@ mariadb_timeout_start_sec: 0
# Set to a specific amount in bytes or to "auto" for server defaults.
mariadb_innodb_buffer_pool_size: "auto"

# How many pool instances to use for the buffer pool
# Each instance should ideally be at least 1GB in size.
# Set to "auto" for server defaults
# https://mariadb.com/kb/en/innodb-buffer-pool/#innodb_buffer_pool_instances
mariadb_innodb_buffer_pool_instances: "auto"

# Automatic pool size tuning example:

# What percentage of system memory to use for InnoDB row cache
Expand All @@ -216,16 +208,6 @@ mariadb_innodb_mem_multiplier: 0.5
# {{ (ansible_memtotal_mb|int * mariadb_innodb_mem_multiplier * 1024 * 1024)
# | round | int }}

# Bytes in a gigabyte. Only used internally to calculate the number of
# pool instances in "mariadb_innodb_buffer_pool_instances"
mariadb_one_gig_bytes: "{{ 1024 * 1024 * 1024 }}"

# Calculate the amount of instances so that they are about 1G in size
# mariadb_innodb_buffer_pool_instances: >-
# {% if mariadb_innodb_buffer_pool_size|int > mariadb_one_gig_bytes|int %}{{
# (mariadb_innodb_buffer_pool_size|int / mariadb_one_gig_bytes|int) |abs |int
# }}{% else %}1{% endif %}

# Maximum allowed concurrent connections. MySQL default is 151
mariadb_max_connections: "auto"

Expand Down
3 changes: 0 additions & 3 deletions templates/etc/my.cnf.d/server.cnf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ collation-server = {{ mariadb_collation_server }}
{% if mariadb_innodb_buffer_pool_size | default('auto') != "auto" %}
innodb_buffer_pool_size = {{ mariadb_innodb_buffer_pool_size }}
{% endif %}
{% if mariadb_innodb_buffer_pool_instances | default('auto') != "auto" %}
innodb_buffer_pool_instances = {{ mariadb_innodb_buffer_pool_instances }}
{% endif %}
{% if mariadb_innodb_read_io_threads | default('auto') != "auto" %}
innodb_read_io_threads = {{ mariadb_innodb_read_io_threads }}
{% endif %}
Expand Down
3 changes: 0 additions & 3 deletions templates/etc/my.cnf.d/server.cnf.temp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ collation-server = {{ mariadb_collation_server }}
{% if mariadb_innodb_buffer_pool_size | default('auto') != "auto" %}
innodb_buffer_pool_size = {{ mariadb_innodb_buffer_pool_size }}
{% endif %}
{% if mariadb_innodb_buffer_pool_instances | default('auto') != "auto" %}
innodb_buffer_pool_instances = {{ mariadb_innodb_buffer_pool_instances }}
{% endif %}
{% if mariadb_innodb_read_io_threads | default('auto') != "auto" %}
innodb_read_io_threads = {{ mariadb_innodb_read_io_threads }}
{% endif %}
Expand Down
6 changes: 0 additions & 6 deletions templates/etc/mysql/my.cnf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,18 @@ socket = {{ mariadb_login_unix_socket }}
[mysqld]
basedir = /usr
datadir = {{ mariadb_mysql_settings['datadir'] }}
expire_logs_days = {{ mariadb_mysql_settings['expire_logs_days'] }}
key_buffer_size = {{ mariadb_mysql_settings['key_buffer_size'] }}
lc-messages-dir = /usr/share/mysql
log_error = /var/log/mysql/error.log
max_allowed_packet = {{ mariadb_mysql_settings['max_allowed_packet'] }}
max_binlog_size = {{ mariadb_mysql_settings['max_binlog_size'] }}
myisam-recover = BACKUP
pid-file = /var/run/mysqld/mysqld.pid
port = {{ mariadb_mysql_port }}
query_cache_limit = {{ mariadb_mysql_settings['query_cache_limit'] }}
query_cache_size = {{ mariadb_mysql_settings['query_cache_size'] }}
skip-external-locking
socket = {{ mariadb_login_unix_socket }}
thread_cache_size = {{ mariadb_mysql_settings['thread_cache_size'] }}
thread_stack = {{ mariadb_mysql_settings['thread_stack'] }}
tmpdir = /tmp
user = mysql

Expand All @@ -43,9 +40,6 @@ innodb_buffer_pool_size = {{ mariadb_innodb_buffer_pool_size }}
{% if mariadb_innodb_lock_wait_timeout | default('50') != "50" %}
innodb_lock_wait_timeout = {{ mariadb_innodb_lock_wait_timeout }}
{% endif %}
{% if mariadb_innodb_buffer_pool_instances | default('auto') != "auto" %}
innodb_buffer_pool_instances = {{ mariadb_innodb_buffer_pool_instances }}
{% endif %}
{% if mariadb_innodb_read_io_threads | default('auto') != "auto" %}
innodb_read_io_threads = {{ mariadb_innodb_read_io_threads }}
{% endif %}
Expand Down

0 comments on commit f0cf82b

Please sign in to comment.