morteza3245

Well-Known Member
Sep 16, 2013
138
1
18
cPanel Access Level
Root Administrator
Hi

below is my output from mysql tuner :

Code:
[email protected] [/]# /usr/local/bin/mysqltuner.pl

 >>  MySQLTuner 1.2.0 - Major Hayden <[email protected]>
 >>  Bug reports, feature requests, and downloads at [url]http://mysqltuner.com/[/url]
 >>  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
w[--] Data in MyISAM tables: 8G (Tables: 14459)
[--] Data in InnoDB tables: 126M (Tables: 2762)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[--] Data in MEMORY tables: 19M (Tables: 90)
[!!] Total fragmented tables: 3066

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

-------- Performance Metrics -------------------------------------------------
[--] Up for: 26d 23h 22m 4s (1B q [557.181 qps], 11M conn, TX: 12616B, RX: 136B)
[--] Reads / Writes: 90% / 10%
[--] Total buffers: 1.1G global + 2.6M per thread (151 max threads)
[OK] Maximum possible memory usage: 1.5G (2% of installed RAM)
[OK] Slow queries: 0% (107/1B)
[OK] Highest usage of available connections: 68% (104/151)
[OK] Key buffer size / total MyISAM indexes: 963.0M/1.4G
[OK] Key buffer hit rate: 99.5% (24B cached / 114M reads)
[OK] Query cache efficiency: 31.8% (371M cached / 1B selects)
[!!] Query cache prunes per day: 2184557
[OK] Sorts requiring temporary tables: 0% (12K temp sorts / 16M sorts)
[!!] Joins performed without indexes: 214864
[!!] Temporary tables created on disk: 27% (4M on disk / 17M total)
[OK] Thread cache hit rate: 97% (231K created / 11M connections)
[!!] Table cache hit rate: 0% (400 open / 124M opened)
[OK] Open file limit used: 1% (737/43K)
[OK] Table locks acquired immediately: 99% (894M immediate / 894M locks)
[OK] InnoDB data size / buffer pool: 126.6M/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
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
    query_cache_size (> 16M)
    join_buffer_size (> 512B, or always use indexes with joins)
    tmp_table_size (> 32M)
    max_heap_table_size (> 256M)
    table_cache (> 400)

[email protected] [/]# w^C
my config my.cnf is:

Code:
[mysqld]
local-infile=0
join_buffer_size=512
query_cache_size=16M
tmp_table_size=32M
max_heap_table_size=256M
thread_cache_size=4
max_allowed_packet=32M
key_buffer_size=963M
query_cache_limit=1M
open_files_limit=43042
can you Please help me for optimize best performance?

Thanks.
 

thinkbot

Well-Known Member
Oct 30, 2012
326
1
16
cPanel Access Level
Root Administrator
[mysqld]
local-infile=0
myisam_use_mmap=1

join_buffer_size=1M
read_rnd_buffer_size=2M

query_cache_type = 1
query_cache_size=50M
query_cache_limit=1M

tmp_table_size=50M
max_heap_table_size=50M

thread_cache_size=30
table_open_cache = 5000
table_definition_cache = 2500

max_allowed_packet=32M
key_buffer_size=5G

open_files_limit=20000

slow_query_log=1
slow_query_log_file=mysql-slow.log
long_query_time=0.1


innodb_buffer_pool_size = 200M
 

thinkbot

Well-Known Member
Oct 30, 2012
326
1
16
cPanel Access Level
Root Administrator
That blog post is from February 14, 2007, on mysql version 5.0


In your case 1,5G would be more than enough, but this is max option, we set it max 5G, so when needed it will increase to this number