From 30d6a3122452301873e4fcbb977285988b8ec7e4 Mon Sep 17 00:00:00 2001 From: Gabriel PREDA Date: Fri, 31 Dec 2021 12:57:45 +0200 Subject: [PATCH] Removed: - `expire_logs_days` - deprecated in MySQL, MariaDB added the new variable `binlog_expire_logs_seconds` - if anyone needs that they can use via overrides option - `pid-file` - remove it as this is not needed in SystemD servers - `innodb_buffer_pool_instances` - deprecated as of MariaDB 10.5.1, removed from MariaDB 10.6 - there is no problem in removing it even for old installs - `thread_stack` - is set by default at 192K but starting from MariaDB 10.0 it is by default 288K Closes #76 --- defaults/main.yml | 18 ------------------ templates/etc/my.cnf.d/server.cnf.j2 | 3 --- templates/etc/my.cnf.d/server.cnf.temp.j2 | 3 --- templates/etc/mysql/my.cnf.j2 | 6 ------ 4 files changed, 30 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 00262bb..4be4c26 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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" @@ -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. @@ -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 @@ -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" diff --git a/templates/etc/my.cnf.d/server.cnf.j2 b/templates/etc/my.cnf.d/server.cnf.j2 index 7f8cd3d..3e60096 100644 --- a/templates/etc/my.cnf.d/server.cnf.j2 +++ b/templates/etc/my.cnf.d/server.cnf.j2 @@ -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 %} diff --git a/templates/etc/my.cnf.d/server.cnf.temp.j2 b/templates/etc/my.cnf.d/server.cnf.temp.j2 index 931e9b7..04dc06e 100644 --- a/templates/etc/my.cnf.d/server.cnf.temp.j2 +++ b/templates/etc/my.cnf.d/server.cnf.temp.j2 @@ -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 %} diff --git a/templates/etc/mysql/my.cnf.j2 b/templates/etc/mysql/my.cnf.j2 index 05b3b1d..1adba98 100644 --- a/templates/etc/mysql/my.cnf.j2 +++ b/templates/etc/mysql/my.cnf.j2 @@ -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 @@ -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 %}