1

I am having performance problems, with a mariadb database that I use for a Zabbix server, the MySQLTuner 2.5.3 error analyzer finds the following: could you advise me what values to set and in what file? I deeply appreciate the help you can offer me in advance.

 >>  MySQLTuner 2.5.3
     * Jean-Marie Renouard <[email protected]>
     * Major Hayden <[email protected]>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.pl/
 >>  Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[OK] Logged in using credentials from Debian maintenance account.
[OK] Operating on 64-bit architecture
 
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE 
[--] Data in Aria tables: 32.0K (Tables: 1)
[--] Data in InnoDB tables: 7.8G (Tables: 173)
[OK] Total fragmented tables: 0
 
[OK] Currently running supported MySQL version 10.6.16-MariaDB-0ubuntu0.22.04.1
 
-------- Log file Recommendations ------------------------------------------------------------------
[!!] Log file  doesn't exist
 
-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.
 
-------- Views Metrics -----------------------------------------------------------------------------
 
-------- Triggers Metrics --------------------------------------------------------------------------
 
-------- Routines Metrics --------------------------------------------------------------------------
 
-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[!!] There is no basic password file list!
 
-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined
 
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 13d 18h 2m 27s (47M q [40.167 qps], 80K conn, TX: 215G, RX: 7G)
[--] Reads / Writes: 54% / 46%
[--] Binary logging is disabled
[--] Physical Memory     : 31.3G
[--] Max MySQL memory    : 32.5G
[--] Other process memory: 0B
[--] Total buffers: 23.2G global + 3.2M per thread (3000 max threads)
[--] Performance_schema Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 23.3G (74.34% of installed RAM)
[!!] Maximum possible memory usage: 32.5G (103.77% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (10K/47M)
[OK] Highest usage of available connections: 1% (41/3000)
[OK] Aborted connections: 0.00% (0/80484)
[!!] Name resolution is active: a reverse name resolution is made for each new connection which can reduce performance
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1M sorts)
[!!] Joins performed without indexes: 98131
[OK] Temporary tables created on disk: 3% (21K on disk / 595K total)
[OK] Thread cache hit rate: 99% (136 created / 80K connections)
[OK] Table cache hit rate: 99% (22M hits / 22M requests)
[!!] table_definition_cache (400) is less than number of tables (465) 
[OK] Open file limit used: 0% (59/19K)
[OK] Table locks acquired immediately: 100% (532 immediate / 532 locks)
 
-------- Performance schema ------------------------------------------------------------------------
[!!] Performance_schema should be activated.
[--] Sys schema is installed.
 
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.
 
-------- MyISAM Metrics ----------------------------------------------------------------------------
[--] General MyIsam metrics:
[--]  +-- Total MyISAM Tables  : 0
[--]  +-- Total MyISAM indexes : 0B
[--]  +-- KB Size :1.0G
[--]  +-- KB Used Size :186.7M
[--]  +-- KB used :18.2%
[--]  +-- Read KB hit rate: 0% (0 cached / 0 reads)
[--]  +-- Write KB hit rate: 0% (0 cached / 0 writes)
[--] No MyISAM table(s) detected ....
 
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[OK] InnoDB File per table is activated
[OK] InnoDB Buffer Pool size ( 22.0G ) under limit for 64 bits architecture: (17179869184.0G )
[OK] InnoDB buffer pool / data size: 22.0G / 7.8G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (0.426136363636364%): 96.0M * 1 / 22.0G should be equal to 25%
[--] Number of InnoDB Buffer Pool Chunk: 176 for 1 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 100.00% (6801776809 hits / 6801918019 total)
[!!] InnoDB Write Log efficiency: 53.07% (4351494 hits / 8200043 total)
[OK] InnoDB log waits: 0.00% (0 waits / 3848549 writes)
 
-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/352.0K
[!!] Aria pagecache hit rate: 90.8% (79K cached / 7K reads)
 
-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.
 
-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.
 
-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.
 
-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: MIXED
[--] XA support enabled: ON
[--] Semi synchronous replication Master: OFF
[--] Semi synchronous replication Slave: OFF
[--] This is a standalone server
 
-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
    Reduce your overall MySQL memory footprint for system stability
    Dedicate this server to your database for highest performance.
    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=ON
    We will suggest raising the 'join_buffer_size' until JOINs not using indexes are found.
             See https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_join_buffer_size
    Performance schema should be activated for better diagnostics
    Be careful, increasing innodb_log_file_size / innodb_log_files_in_group means higher crash recovery mean time
Variables to adjust:
  *** MySQL's maximum memory usage is dangerously high ***
  *** Add RAM before increasing MySQL buffer variables ***
    skip-name-resolve=ON
    join_buffer_size (> 512.0K, or always use indexes with JOINs)
    table_definition_cache (400) > 465 or -1 (autosizing if supported)
    performance_schema=ON
    innodb_log_file_size should be (=5G) if possible, so InnoDB total log file size equals 25% of buffer pool size.
    innodb_log_buffer_size (> 16M)
4
  • 1
    Use the SlowLog
    – Rick James
    Commented Mar 11 at 22:23
  • Additional DB information request, please. OS, Version? RAM size, # cores, any SSD or NVME devices on MySQL Host server? Post TEXT data on justpaste.it and share the links. From your SSH login root, Text results of: A) SELECT COUNT(*) FROM information_schema.tables; B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) STATUS; not SHOW STATUS, just STATUS; G) SHOW ENGINE INNODB STATUS; for server workload tuning analysis to provide Perormance Improving suggestions. Welcome to SF. Commented Mar 12 at 0:39
  • Post TEXT data on justpaste.it and share the links. Additional very helpful OS information includes - please, htop 1st page, if available, TERMINATE, top -b -n 1 for most active apps, top -b -n 1 -H for details on your mysql threads memory and cpu usage, ulimit -a for list of limits, iostat -xm 5 3 for IOPS by device & core/cpu count, df -h for Used - Free space by device, df -i for inode info by device, free -h for Used - Free Mem: and Swap:, cat /proc/meminfo includes VMallocUused, for server workload tuning analysis to provide suggestions. Commented Mar 12 at 0:39
  • Do you still wish to improve performance with your MariaDB and Zabbix instance? Please provide additional data requested on March 12, 2024 when time permits. Commented May 22 at 20:19

1 Answer 1

0

I would let atop run on a certain interval to get an overall insight into the performance of the server. Atop can capture performance snapshots of the compute resources like memory,CPU,disk and process

And since it might be zabbix specific it might also be a good idea to create a thread at the zabbix forum

https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .