We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

mySql Tuner


mlodszy
12-01-2015, 18:54
Dostałeś sugestie ale nawet nie raczyłeś zidentyfikować o co chodzi:
Variables to adjust:
key_buffer_size (> 396.2M)
query_cache_size (>= 8M)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
thread_cache_size (start at 4)
innodb_buffer_pool_size (>= 3M)
http://dev.mysql.com/doc/refman/5.0/...on-tables.html

djgibo
11-01-2015, 08:23
Witam wszystkich, potrzebuję pomocy w zoptymalizowaniu serwera mysql, mój plik my.cnf to:

Kod:
[mysqld]
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

innodb_buffer_pool_size=2M
innodb_additional_mem_pool_size=500K
innodb_log_buffer_size=500K
innodb_thread_concurrency=2
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
innodb_buffer_pool_size=2M
innodb_additional_mem_pool_size=500K
innodb_log_buffer_size=500K
innodb_thread_concurrency=2
a wynik z mysqltuner to:

Kod:
 >>  MySQLTuner 1.4.0 - Major Hayden 
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
[OK] Currently running supported MySQL version 5.1.73
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +CSV +InnoDB +MRG_MYISAM
[--] Data in MyISAM tables: 818M (Tables: 569)
[--] Data in InnoDB tables: 3M (Tables: 236)
[!!] Total fragmented tables: 291

-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 11s (230 q [20.909 qps], 17 conn, TX: 923K, RX: 23K)
[--] Reads / Writes: 95% / 5%
[--] Total buffers: 27.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 442.2M (3% of installed RAM)
[OK] Slow queries: 0% (0/230)
[OK] Highest usage of available connections: 1% (2/151)
[!!] Key buffer size / total MyISAM indexes: 8.0M/396.2M
[!!] Key buffer hit rate: 80.1% (19K cached / 3K reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 7% (2 temp sorts / 26 sorts)
[!!] Temporary tables created on disk: 66% (6 on disk / 9 total)
[!!] Thread cache is disabled
[OK] Table cache hit rate: 82% (34 open / 41 opened)
[OK] Open file limit used: 5% (60/1K)
[OK] Table locks acquired immediately: 100% (203 immediate / 203 locks)
[!!] InnoDB  buffer pool / data size: 2.0M/3.8M
[OK] InnoDB log waits: 0
-------- 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
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Set thread_cache_size to 4 as a starting value
Variables to adjust:
    key_buffer_size (> 396.2M)
    query_cache_size (>= 8M)
    tmp_table_size (> 16M)
    max_heap_table_size (> 16M)
    thread_cache_size (start at 4)
    innodb_buffer_pool_size (>= 3M)

6 vCore
12gb ram

Z góry dziękuje za sugestie i podpowiedzi.