mysql tuning problem: show query and fragmented tables!
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
>> MySQLTuner 0.9.9 - Major Hayden <firstname.lastname@example.org>
>> 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.0.22
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated -InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 2G (Tables: 469)
[--] Data in MEMORY tables: 16M (Tables: 3)
[!!] Total fragmented tables: 115
-------- Performance Metrics -------------------------------------------------
[--] Up for: 31m 59s (420K q [219.334 qps], 49K conn, TX: 453M, RX: 77M)
[--] Reads / Writes: 60% / 40%
[--] Total buffers: 1.8G global + 26.2M per thread (512 max threads)
[!!] Maximum possible memory usage: 14.9G (191% of installed RAM)
[!!] Slow queries: 7% (32K/420K)
[OK] Highest usage of available connections: 55% (284/512)
[OK] Key buffer size / total MyISAM indexes: 1.0G/395.2M
[OK] Key buffer hit rate: 99.1% (5M cached / 46K reads)
[OK] Query cache efficiency: 38.1% (70K cached / 185K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (87 temp sorts / 14K sorts)
[OK] Temporary tables created on disk: 5% (569 on disk / 11K total)
[OK] Thread cache hit rate: 99% (284 created / 49K connections)
[OK] Table cache hit rate: 99% (881 open / 887 opened)
[OK] Open file limit used: 25% (1K/5K)
[OK] Table locks acquired immediately: 96% (280K immediate / 289K locks)
report by tuning-primer.sh :
mysqld is alive
-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -
MySQL Version 5.0.22 x86_64
Uptime = 0 days 0 hrs 33 min 30 sec
Avg. qps = 218
Total Questions = 439489
Threads Connected = 14
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
Current thread_cache_size = 512
Current threads_cached = 272
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine
Current max_connections = 512
Current threads_connected = 12
Historic max_used_connections = 284
The number of used connections is 55% of the configured maximum.
Your max_connections variable seems to be fine.
Max Memory Ever Allocated : 8 G
Configured Max Per-thread Buffers : 13 G
Configured Max Global Buffers : 1 G
Configured Max Memory Limit : 14 G
Physical Memory : 7.78 G
Max memory limit exceeds 90% of physical memory
Current MyISAM index space = 389 M
Current key_buffer_size = 1 G
Key cache miss rate is 1 : 116
Key buffer fill ratio = 5.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere
Query cache is enabled
Current query_cache_size = 32 M
Current query_cache_used = 8 M
Current query_cache_limit = 2 M
Current Query cache Memory fill ratio = 27.39 %
Current query_cache_min_res_unit = 4 K
MySQL won't cache query results that are larger than query_cache_limit in size
Current sort_buffer_size = 8 M
Current read_rnd_buffer_size = 7 M
Sort buffer seems to be fine
Current join_buffer_size = 2.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
OPEN FILES LIMIT
Current open_files_limit = 5120 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine
Current table_cache value = 2048 tables
You have a total of 489 tables
You have 883 open tables.
The table_cache value seems to be fine
Current max_heap_table_size = 767 M
Current tmp_table_size = 768 M
Of 11369 temp tables, 5% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine
Current read_buffer_size = 7 M
Current table scan ratio = 10037 : 1
read_buffer_size seems to be fine
Current Lock Wait ratio = 1 : 30
You may benefit from selective use of InnoDB.