Sample Header Ad - 728x90

Help me tune Mysql instance to support more users

1 vote
0 answers
160 views
I'm currently supporting, A Moodle 3.10 instance, running MySQL 8.0.20. This is running through an Azure Provider as a Standard DS11(2 vcpus, 14 GiB memory). Running as a LAMP stack server. Currently, there is a bottleneck on the Server with the load on the database and low usage of memory, during peak windows. Need to find optimal ways to tune the database to support more concurrent users (it slows down at ~100 users, would like to get it to support 250 users if possible. Attached a MySQL Tuner file below as well.
[--] Skipped version check for MySQLTuner script
Please enter your MySQL administrative password: [OK] Currently running supported MySQL version 8.0.20
[OK] Operating on 64-bit architecture
 
-------- Log file Recommendations ------------------------------------------------------------------
[!!] Log file /opt/bitnami/mysql/data/mysqld.log doesn't exist
 
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA 
[--] Data in InnoDB tables: 2.9G (Tables: 464)
[OK] Total fragmented tables: 0
 
-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.
 
-------- Security Recommendations ------------------------------------------------------------------
[--] Skipped due to unsupported feature for MySQL 8
 
-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined
 
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 6d 11h 7m 48s (99M q [178.845 qps], 10M conn, TX: 58G, RX: 11G)
[--] Reads / Writes: 85% / 15%
[--] Binary logging is enabled (GTID MODE: OFF)
[--] Physical Memory     : 13.7G
[--] Max MySQL memory    : 10.9G
[--] Other process memory: 0B
[--] Total buffers: 6.0G global + 33.3M per thread (151 max threads)
[--] P_S Max memory usage: 72B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 7.2G (52.85% of installed RAM)
[OK] Maximum possible memory usage: 10.9G (79.89% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/99M)
[OK] Highest usage of available connections: 24% (37/151)
[OK] Aborted connections: 0.00%  (7/10825746)
[--] Query cache have been removed in MySQL 8
[OK] Sorts requiring temporary tables: 0% (52 temp sorts / 2M sorts)
[!!] Joins performed without indexes: 81493
[OK] Temporary tables created on disk: 0% (1K on disk / 2M total)
[OK] Thread cache hit rate: 99% (37 created / 10M connections)
[OK] Table cache hit rate: 27% (4K open / 14K opened)
[OK] table_definition_cache(2000) is upper than number of tables(774)
[OK] Open file limit used: 0% (2/65K)
[OK] Table locks acquired immediately: 100% (141K immediate / 141K locks)
[OK] Binlog cache memory access: 99.95% (8182744 Memory / 8186895 Total)
 
-------- Performance schema ------------------------------------------------------------------------
[--] Memory used by P_S: 72B
[--] Sys schema is installed.
 
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.
 
-------- MyISAM Metrics ----------------------------------------------------------------------------
[--] MyISAM Metrics are disabled on last MySQL versions.
 
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 6.0G/2.9G
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 768.0M * 2/6.0G should be equal to 25%
[!!] InnoDB buffer pool instances: 8
[--] Number of InnoDB Buffer Pool Chunk : 48 for 8 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% (5172515853 hits/ 5172589612 total)
[!!] InnoDB Write Log efficiency: 78.71% (75749720 hits/ 96240545 total)
[OK] InnoDB log waits: 0.00% (0 waits / 20490825 writes)
 
-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is disabled.
 
-------- 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: ROW
[--] XA support enabled: ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[--] This is a standalone server

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
    We will suggest raising the 'join_buffer_size' until JOINs not using indexes are found.
             See https://dev.mysql.com/doc/internals/en/join-buffer-size.html 
             (specially the conclusions at the bottom of the page).
Variables to adjust:
    join_buffer_size (> 256.0K, or always use indexes with JOINs)
    innodb_buffer_pool_instances(=6)
Asked by CorrectHorseBatteryStaple (11 rep)
Feb 7, 2021, 11:14 PM