Explicitly disable all MySQL/MariaDB query_cache use

The query_cache in MySQL / MariaDB is generally not recommended,
as it tends to produce more cache misses than hits and adds latency to all
queries.  Upstream MySQL / MariaDB are  moving away from it, MariaDB > 10.1.7
now defaults it to OFF, MySQL has deprecated the entire feature. Ideally
puppet-mysql would default query_cache_type to zero as well. While it is likely
that recent TripleO versions are producing a     MariaDB without a query cache
in any case due to its default of  off, add the values explicitly to avoid
confusion and to  support potential backporting efforts.

References:

https://mariadb.com/kb/en/library/mariadb-memory-allocation/#query-cache
https://mysqlserverteam.com/mysql-8-0-retiring-support-for-the-query-cache/
https://mariadb.com/kb/en/library/mariadb-1017-release-notes/#notable-changes
https://haydenjames.io/mysql-query-cache-size-performance/

Change-Id: Iadee0cbffbb50d20a5e97c8883fd955fa5cb9266
This commit is contained in:
Mike Bayer 2019-06-10 13:54:22 -04:00
parent 2b112038d7
commit becc424539
1 changed files with 2 additions and 0 deletions

View File

@ -167,6 +167,8 @@ class tripleo::profile::base::database::mysql (
'innodb_lock_wait_timeout' => $innodb_lock_wait_timeout,
'table_open_cache' => $table_open_cache,
'innodb_flush_method' => $innodb_flush_method,
'query_cache_size' => '0',
'query_cache_type' => '0',
'ssl' => $enable_internal_tls,
'ssl-key' => $tls_keyfile,
'ssl-cert' => $tls_certfile,