Этот вопрос закрыт для ответов, так как повторяет вопрос Оптимизация mysql. Какие рекомендации mysqltuner стоит применить?
@boroda32

Оптимизация mysql. Какие рекомендации mysqltuner применить?

Добрый день.
Сайт находитя на VPS(10 GB RAM, 2 CPU core, 65 GB SSD).
Я поставил mysqltuner и получил рекомендации по настройке mysql.
Хочу уточнить, какие из этих рекомендаций нужно применить для получения производительности.
И какие значения поставить mysql параметрам?

Текущие настройки Mysql

[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 = 0
sql_mode=
query_cache_type = 1


Рекомендации Mysqltuner

>> 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
Reduce your SELECT DISTINCT queries without LIMIT clauses
Variables to adjust:
query_cache_size (> 32M)
join_buffer_size (> 1.8M, or always use indexes with joins)
tmp_table_size (> 147M)
max_heap_table_size (> 147M)
innodb_buffer_pool_size (>= 7G)

  • Вопрос задан
  • 242 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Вопрос закрыт для ответов и комментариев

Потому что уже есть похожий вопрос.
Похожие вопросы