HiveBrain v1.2.0
Get Started
← Back to all entries
gotchasqlMinor

Mariadb MySQL Tuner report confusing

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
confusingtunermysqlreportmariadb

Problem

I'd like to ask you to clarify the report from mysqltuner regarding MariaDB database. The mysqltuner was called with --nogood flag!

```
>> MySQLTuner 1.7.1 - Major Hayden
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[!!] Currently running unsupported MySQL version 10.0.29-MariaDB-0ubuntu0.16.04.1

-------- Log file Recommendations ------------------------------------------------------------------
[--] Log file: (0B)
[!!] Log file doesn't exist
[!!] Log file isn't readable.

-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +Aria +BLACKHOLE +CSV +FEDERATED +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA
[--] Data in InnoDB tables: 380M (Tables: 417)

-------- Security Recommendations ------------------------------------------------------------------
[--] There are 605 basic passwords in the list.

-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 15s (812 q [54.133 qps], 275 conn, TX: 258K, RX: 108K)
[--] Reads / Writes: 100% / 0%
[--] Binary logging is disabled
[--] Physical Memory : 31.3G
[--] Max MySQL memory : 10.0G
[--] Other process memory: 1.2G
[--] Total buffers: 8.4G global + 10.7M per thread (150 max threads)
[--] P_S Max memory usage: 34M
[--] Galera GCache Max memory usage: 0B
[!!] Slow queries: 27% (221/812)
[!!] Query cache may be disabled by default due to mutex contention.
[!!] Query cache efficiency: 0.0% (0 cached / 521 selects)

-------- Performance schema ------------------------------------------------------------------------
[--] Memory used by P_S: 35.0M
[--] Sys schema isn't installed.

-------- T

Solution

I can explain this line

[!!] Query cache may be disabled by default due to mutex contention.


The InnoDB storage engine and the Query Cache are in a constant state of war (See my 1.5-year-old post Why query_cache_type is disabled by default start from MySQL 5.6?)

mysqltuner is recommending setting query_cache_type to 0 so you explicitly disable the query cache. Please don't forget to set query_cache_size to 0 as well. Otherwise, the mutexing behavior will passive occur anyway.

As I said in my old post, you don't necessarily have to disable the query cache if your reasonably know the size of your most common result sets. If you can figure out that size, then you can query_cache_limit and query_cache_min_res_unit as the upper and lower bound of result set sizes. Only then can you set query_cache_type to 1.

As for your Log File Recommendations

[--] Log file: (0B)
[!!] Log file  doesn't exist
[!!] Log file  isn't readable.


Perhaps this might explain it

[!!] Currently running unsupported MySQL version 10.0.29-MariaDB-0ubuntu0.16.04.1


It is possible mysqltuner cannot relate to log files in this version of MariaDB like it does with supported versions.

Code Snippets

[!!] Query cache may be disabled by default due to mutex contention.
[--] Log file: (0B)
[!!] Log file  doesn't exist
[!!] Log file  isn't readable.
[!!] Currently running unsupported MySQL version 10.0.29-MariaDB-0ubuntu0.16.04.1

Context

StackExchange Database Administrators Q#167271, answer score: 7

Revisions (0)

No revisions yet.