Solved

mysqltuner.sh results help

Posted on 2014-12-04
4
216 Views
Last Modified: 2014-12-12
Hello,

Below are the results for my tuner script, I tried optimizing the tables but it just said that my innodb tables could not be updated.

Also can you please suggest the changes to the my.cnf.

Thank you for your time!

 >>  MySQLTuner 1.3.0 - Major Hayden <major@mhtx.net>
 >>  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-log
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +CSV +InnoDB +MRG_MYISAM 
[--] Data in MyISAM tables: 12M (Tables: 168)
[--] Data in InnoDB tables: 4G (Tables: 2163)
[--] Data in MEMORY tables: 1M (Tables: 86)
[!!] Total fragmented tables: 2168

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

-------- Performance Metrics -------------------------------------------------
[--] Up for: 2d 19h 23m 58s (43M q [179.459 qps], 414K conn, TX: 79B, RX: 16B)
[--] Reads / Writes: 55% / 45%
[--] Total buffers: 8.6G global + 34.2M per thread (512 max threads)
[OK] Maximum possible memory usage: 25.7G (40% of installed RAM)
[OK] Slow queries: 0% (74/43M)
[OK] Highest usage of available connections: 85% (436/512)
[OK] Key buffer size / total MyISAM indexes: 16.0M/3.4M
[OK] Key buffer hit rate: 100.0% (35M cached / 840 reads)
[OK] Query cache efficiency: 94.7% (36M cached / 38M selects)
[!!] Query cache prunes per day: 73060
[OK] Sorts requiring temporary tables: 1% (5K temp sorts / 462K sorts)
[!!] Joins performed without indexes: 2868
[!!] Temporary tables created on disk: 29% (488K on disk / 1M total)
[OK] Thread cache hit rate: 97% (10K created / 414K connections)
[!!] Table cache hit rate: 0% (256 open / 43K opened)
[OK] Open file limit used: 0% (9/2K)
[OK] Table locks acquired immediately: 99% (7M immediate / 7M locks)
[OK] InnoDB buffer pool / data size: 8.0G/4.5G
[!!] InnoDB log waits: 3
-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Increasing the query_cache size over 128M may reduce performance
    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 (> 512M) [see warning above]
    join_buffer_size (> 16.0M, or always use indexes with joins)
    tmp_table_size (> 32M)
    max_heap_table_size (> 32M)
    table_open_cache (> 256)
    innodb_log_buffer_size (>= 8M)

Open in new window


[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
slow-query-log=/var/log/mysqld-slow.log

max_connections = 512

key_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 10G
query_cache_size = 512M
query_cache_limit = 2M
thread_cache_size = 8
read_buffer_size = 8M
join_buffer_size = 16M
read_rnd_buffer_size = 8M
slow_query_log = 1
long_query_time = 2
thread_concurrency = 8
table_cache = 128
table_open_cache = 256
table_definition_cache = 512
max_heap_table_size = 32M
tmp_table_size = 32M

innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 8G
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 0
innodb_log_buffer_size = 8M
#innodb_log_file_size = 512M
#innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120

max_allowed_packet=16M

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Open in new window

0
Comment
Question by:movieprodw
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 40480888
Hi!

You could start with these values
query_cache_size = 1024M
    join_buffer_size = 32M
    tmp_table_size  = 128M
    max_heap_table_size  = 128M
    table_open_cache = 1024
    innodb_log_buffer_size = 32M

Regards,
     Tomas Helgi
0
 
LVL 1

Author Comment

by:movieprodw
ID: 40481283
I have made those changes, thank you.
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 40485823
Hi!

If you are satisfied with those settings that I provided then
please accept my comment as an answer. :)

Regards,
     Tomas Helgi
0
 
LVL 1

Author Closing Comment

by:movieprodw
ID: 40496733
Thanks
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question