Hello, I would like to help me set up my mysql, weekends have increased visits and the server restarts for excessive CPU usage.
Thanks in advanced.
Technical details of my VPS:
CENTOS 6.5 x86_64 virtuozzo – vps
Total processors: 4
Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
Speed
2000.195 MHz
Cache
15360 KB
(x 4 processors)
Mysql DataBase 5.1.73-cll
PHP Version 5.3.28
Web Server Apache
WebServer PHP Interface cgi-fcgi
Current Memory Usage
total used free shared buffers cached
Mem: 2097152 1938724 158428 0 0 1669088
-/+ buffers/cache: 269636 1827516
Swap: 4194304 437680 3756624
Total: 6291456 2376404 3915052
Current my.cnf file
mysqltuner.pl output
Thanks in advanced.
Thanks in advanced.
Technical details of my VPS:
CENTOS 6.5 x86_64 virtuozzo – vps
Total processors: 4
Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
Speed
2000.195 MHz
Cache
15360 KB
(x 4 processors)
Mysql DataBase 5.1.73-cll
PHP Version 5.3.28
Web Server Apache
WebServer PHP Interface cgi-fcgi
Current Memory Usage
total used free shared buffers cached
Mem: 2097152 1938724 158428 0 0 1669088
-/+ buffers/cache: 269636 1827516
Swap: 4194304 437680 3756624
Total: 6291456 2376404 3915052
Current my.cnf file
Code:
[mysqld]
innodb_file_per_table=1
open_files_limit=10192
query_cache_size=16M
join_buffer_size=128K
tmp_table_size=32M
max_heap_table_size=32M
thread_cache_size=4
table_open_cache=64
Code:
>> MySQLTuner 1.3.0 - Major Hayden <[email protected]>
>> 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-cll
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in MyISAM tables: 24M (Tables: 254)
[--] Data in InnoDB tables: 1M (Tables: 72)
[--] Data in MEMORY tables: 0B (Tables: 2)
[!!] Total fragmented tables: 8
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 3d 14h 6m 28s (16M q [51.946 qps], 171K conn, TX: 24B, RX: 2B)
[--] Reads / Writes: 63% / 37%
[--] Total buffers: 66.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 481.2M (23% of installed RAM)
[OK] Slow queries: 0% (0/16M)
[OK] Highest usage of available connections: 14% (22/151)
[OK] Key buffer size / total MyISAM indexes: 8.0M/9.1M
[OK] Key buffer hit rate: 100.0% (105M cached / 12K reads)
[OK] Query cache efficiency: 95.7% (14M cached / 15M selects)
[B][!!][/B] Query cache prunes per day: 4128
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 83K sorts)
[B][!!][/B] Joins performed without indexes: 8854
[B][!!] [/B]Temporary tables created on disk: 43% (151K on disk / 347K total)
[OK] Thread cache hit rate: 99% (1K created / 171K connections)
[B][!!] [/B]Table cache hit rate: 0% (64 open / 13K opened)
[OK] Open file limit used: 1% (111/10K)
[OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)
[OK] InnoDB buffer pool / data size: 8.0M/1.1M
[OK] InnoDB log waits: 0
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Enable the slow query log to troubleshoot bad queries
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
Increase table_open_cache gradually to avoid file descriptor limits
Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C
Variables to adjust:
query_cache_size (> 16M)
join_buffer_size (> 128.0K, or always use indexes with joins)
tmp_table_size (> 32M)
max_heap_table_size (> 32M)
table_open_cache (> 64)
Thanks in advanced.