B
B
boroda322018-06-04 15:30:22
MySQL
boroda32, 2018-06-04 15:30:22

mysql optimization. What mysqltuner recommendations to apply?

Good afternoon.
The site is located on a VPS (10 GB RAM, 2 CPU core, 65 GB SSD).
I installed mysqltuner and got advice on how to tune mysql.
I want to clarify which of these recommendations need to be applied to obtain performance.
And what values ​​to put mysql parameters?
Current MySQL settings


[mysqld]
key_buffer_size = 8388608
innodb_buffer_pool_size = 368M
query_cache_size = 32M
max_heap_table_size = 147M
tmp_table_size = 147M
join_buffer_size = 1887K
innodb_flush_log_at_trx_commit = 2
explicit_defaults_for_timestamp = achetype_c_mode= 0
sql_mode

Mysql tuner recommendations

>> MySQLTuner 1.3.0 - Major Hayden
>> Bug reports, feature requests, and downloads at mysqltuner.com
>> Run with '--help' for additional options and output filtering
[OK] Logged in using credentials from debian maintenance account.
[OK] Currently running supported MySQL version 5.6.40
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics ------------------- -----------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in InnoDB tables : 7G (Tables: 818)
[--] Data in MyISAM tables: 37M (Tables: 5)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 52)
[!!] Total fragmented tables: 83
-------- Security Recommendations ---------------------------------------- ---
[OK] All database users have passwords assigned
-------- Performance Metrics ---------------------------- ----------------------
[--] Up for: 24d 1h 45m 56s (126M q [61.024 qps], 2M conn, TX: 577B, RX: 115B )
[--] Reads / Writes: 57% / 43%
[--] Total buffers: 571.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 981.4M (9% of installed RAM )
[OK] Slow queries: 0% (541/126M)
[OK] Highest usage of available connections: 43% (66/151)
[OK] Key buffer size / total MyISAM indexes: 8.0M/4.5M
[OK] Key buffer hit rate: 100.0% (3B cached / 4K reads)
[OK] Query cache efficiency: 80.7% (81M cached / 100M selects)
[!!] Query cache prunes per day: 235085
[OK] Sorts requiring temporary tables: 0% (27K temp sorts / 4M sorts)
[!!] Joins performed without indexes: 61175
[!!] Temporary tables created on disk: 42% (2M on disk / 6M total)
[OK] Thread cache hit rate: 99% (2K created / 2M connections)
[OK] Table cache hit rate: 56% (1K open / 3K opened)
[OK] Open file limit used: 0% (61/16K)
[OK] Table locks acquired immediately: 99% (77M immediate / 77M locks)
[!!] InnoDB buffer pool / data size: 368.0M/7.2G
[OK] InnoDB log waits: 0
-------- Recommendations -------------------------- ----------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Adjust your join queries to always utilize indexes When making adjustments , make
tmp_table_size/ max_heap_table_size
equal always use indexes with joins) tmp_table_size (> 147M) max_heap_table_size (> 147M) innodb_buffer_pool_size (>= 7G)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question