From 57a83cef26c555cba5578c4fe235fdda29596ef2 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 29 Dec 2020 11:10:31 +0200 Subject: [PATCH] roles/mariadb: Tweak temp table size mysqltuner.pl said: When making adjustments, make tmp_table_size/max_heap_table_size equal --- roles/mariadb/defaults/main.yml | 4 ++++ roles/mariadb/templates/my.cnf.j2 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/mariadb/defaults/main.yml b/roles/mariadb/defaults/main.yml index 15df54e..dbc32d7 100644 --- a/roles/mariadb/defaults/main.yml +++ b/roles/mariadb/defaults/main.yml @@ -27,4 +27,8 @@ max_connections: 33 query_cache_size: 0 query_cache_type: 0 +# mysqltuner says we should use larger than 32M on our setup +tmp_table_size: 64M +max_heap_table_size: 64M + # vim: set ts=2 sw=2: diff --git a/roles/mariadb/templates/my.cnf.j2 b/roles/mariadb/templates/my.cnf.j2 index 719bcfd..eff6a3e 100644 --- a/roles/mariadb/templates/my.cnf.j2 +++ b/roles/mariadb/templates/my.cnf.j2 @@ -57,8 +57,8 @@ max_allowed_packet = 16M thread_cache_size = 128 sort_buffer_size = 4M bulk_insert_buffer_size = 16M -tmp_table_size = 32M -max_heap_table_size = 32M +tmp_table_size = {{ tmp_table_size }} +max_heap_table_size = {{ max_heap_table_size }} # # * MyISAM #