Hallo,
bevor ich selber Hand anlege wollte ich gerne mal bei Experten nachfragen wie ich meine mysql-Einstellungen optimieren kann.
Leider springt meine CPU-Auslastung durch Mysql ständig weit über 50% und nähert sich der 100% gefährlich an.
Wäre wirklich sehr nett wenn mir jemand Hilfestellung geben könnte.
Wie hoch soll ich am besten den Wert für join_buffer_size und vor allem innodb_buffer_pool_size setzen?
Muss dazu sagen, dass ich den Server heute neu gestartet habe weil mir MySQL den Server lahmgelegt hat.
Vielen Dank
bevor ich selber Hand anlege wollte ich gerne mal bei Experten nachfragen wie ich meine mysql-Einstellungen optimieren kann.
Leider springt meine CPU-Auslastung durch Mysql ständig weit über 50% und nähert sich der 100% gefährlich an.
Wäre wirklich sehr nett wenn mir jemand Hilfestellung geben könnte.
Code:
>> MySQLTuner 1.0.1 - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.70-0ubuntu0.10.04.1
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 3G (Tables: 1456)
[--] Data in InnoDB tables: 150M (Tables: 274)
[--] Data in MEMORY tables: 124K (Tables: 11)
[!!] Total fragmented tables: 373
-------- Performance Metrics -------------------------------------------------
[--] Up for: 32m 40s (28K q [14.295 qps], 2K conn, TX: 440M, RX: 19M)
[--] Reads / Writes: 76% / 24%
[--] Total buffers: 51.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 456.8M (22% of installed RAM)
[OK] Slow queries: 0% (0/28K)
[OK] Highest usage of available connections: 4% (7/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/625.0M
[OK] Key buffer hit rate: 99.7% (1M cached / 3K reads)
[OK] Query cache efficiency: 45.7% (9K cached / 19K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)
[!!] Joins performed without indexes: 171
[OK] Temporary tables created on disk: 17% (264 on disk / 1K total)
[OK] Thread cache hit rate: 99% (7 created / 2K connections)
[!!] Table cache hit rate: 0% (64 open / 11K opened)
[OK] Open file limit used: 10% (104/1K)
[OK] Table locks acquired immediately: 99% (22K immediate / 22K locks)
[!!] InnoDB data size / buffer pool: 150.2M/2.0M
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
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:
join_buffer_size (> 128.0K, or always use indexes with joins)
table_cache (> 64)
innodb_buffer_pool_size (>= 150M)
Muss dazu sagen, dass ich den Server heute neu gestartet habe weil mir MySQL den Server lahmgelegt hat.
Vielen Dank