I have just purchased a new dedicated server and currently using the defaults for MySQL and Apache. I'm looking to try and optimize the setup as best I can.
Here is the spec of the machine:
Intel Core i7-2600 Quad Core
8GB DDR3 RAM
CentOS 6.4 - 64-Bit
The spec is better than my previous machine, but the server load seems to be generally higher - I did do some tweaks on the previous machine, but I no longer have access to that machine to compare.
I'm not entirely sure what files I should be providing with regards to Apache - in order to optimize, but here are the ones for MySQL.
Here is the contents of /etc/my.cnf
I have run /usr/bin/mysqltuner.pl and this is what is showing - Everything has been running as it is for a tleast 8 days now:
I don't quite understand exactly what it is recommending.
Any help would really be appreciated with this.
Thanks in advance,
Daniel
Here is the spec of the machine:
Intel Core i7-2600 Quad Core
8GB DDR3 RAM
CentOS 6.4 - 64-Bit
The spec is better than my previous machine, but the server load seems to be generally higher - I did do some tweaks on the previous machine, but I no longer have access to that machine to compare.
I'm not entirely sure what files I should be providing with regards to Apache - in order to optimize, but here are the ones for MySQL.
Here is the contents of /etc/my.cnf
Code:
[mysqld]
innodb_file_per_table=1
local-infile=0
open_files_limit=2090
Code:
>> MySQLTuner 1.2.0 - Major Hayden <[email protected]>
>> 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.5.32-cll
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 67M (Tables: 569)
[--] Data in InnoDB tables: 44M (Tables: 935)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[!!] Total fragmented tables: 19
-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned
-------- Performance Metrics -------------------------------------------------
[--] Up for: 10d 19h 41m 26s (6M q [7.023 qps], 968K conn, TX: 21B, RX: 1B)
[--] Reads / Writes: 94% / 6%
[--] Total buffers: 168.0M global + 2.8M per thread (151 max threads)
[OK] Maximum possible memory usage: 583.2M (7% of installed RAM)
[OK] Slow queries: 0% (0/6M)
[OK] Highest usage of available connections: 8% (13/151)
[OK] Key buffer size / total MyISAM indexes: 8.0M/21.1M
[OK] Key buffer hit rate: 99.5% (7M cached / 40K reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (4K temp sorts / 1M sorts)
[!!] Joins performed without indexes: 4801
[!!] Temporary tables created on disk: 27% (60K on disk / 215K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (400 open / 141K opened)
[OK] Open file limit used: 13% (279/2K)
[OK] Table locks acquired immediately: 99% (4M immediate / 4M locks)
[OK] InnoDB data size / buffer pool: 44.4M/128.0M
-------- 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
Set thread_cache_size to 4 as a starting value
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
query_cache_size (>= 8M)
join_buffer_size (> 128.0K, or always use indexes with joins)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
thread_cache_size (start at 4)
table_cache (> 400)
Any help would really be appreciated with this.
Thanks in advance,
Daniel