専用サーバーでMagentoを実行しています。調整が必要かどうかを調べるために、perl スクリプト mysqloptimizer を実行しました。これらは結果です。私は MYSQL 構成にあまり興味がありません。構成を最適化する方法についてアドバイスをいただけますか? 現在の設定には最適な設定がないように感じます。
-------- Performance Metrics -------------------------------------------------
- [--] Up for: 2h 58m 40s (321K q [29.965 qps], 1K conn, TX: 405M, RX: 112M)
- [--] Reads / Writes: 63% / 37%
- [--] Total buffers: 2.1G global + 2.9M per thread (500 max threads)
- [!!] Maximum possible memory usage: 3.5G (91% of installed RAM)
- [OK] Slow queries: 0% (2/321K)
- [OK] Highest usage of available connections: 1% (6/500)
- [OK] Key buffer size / total MyISAM indexes: 8.0M/1.4M
- [OK] Key buffer hit rate: 99.2% (251K cached / 2K reads)
- [OK] Query cache efficiency: 77.3% (210K cached / 272K selects)
- [!!] Query cache prunes per day: 46109
- [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 17K sorts)
- [!!] Joins performed without indexes: 44
- [OK] Temporary tables created on disk: 16% (5K on disk / 30K total)
- [OK] Thread cache hit rate: 99% (6 created / 1K connections)
- [!!] Table cache hit rate: 1% (128 open / 6K opened)
- [OK] Open file limit used: 0% (2/2K)
- [OK] Table locks acquired immediately: 100% (174K immediate / 174K locks)
- [OK] InnoDB data size / buffer pool: 365.1M/2.0G
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Reduce your overall MySQL memory footprint for system stability
Enable the slow query log to troubleshoot bad queries
Adjust your join queries to always utilize indexes
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_size (> 64M)
join_buffer_size (> 256.0K, or always use indexes with joins)
table_cache (> 128)
そしてここに現在の構成変数
local-infile=0
max_allowed_packet=16M
query_cache_size=64M
join_buffer_size=256K
tmp_table_size=16M
max_heap_table_size=64M
innodb_buffer_pool_size=2048M
innodb_additional_mem_pool_size=20M
innodb_lock_wait_timeout=500
thread_cache_size=16
wait_timeout=120
max_connections=500
table_cache=128