The UNIX and Linux Forums  
Ciao e benvenuto da parte degli Stati Uniti al UNIX e Linux Forum! Grazie per la visita ed unirsi alla nostra Comunità Globale.

Go Back   UNIX e Linux Forum > Special Forum > Programmazione Web, Web 2.0 e mashups
.
google unix.com



Programmazione Web, Web 2.0 e mashups Discuti Programmazione Web e Web Server Amministrazione, compresi LAMP, Apache, MySQL, Flash, HTML, SEO, mashups e Web API e altri argomenti.

Più di UNIX e Linux Forum Argomenti potreste trovare utili
Filo Thread Starter Forum Risposte Ultimo Post
tuning naresh.sun SUN Solaris 4 05-21-2008 01:25 AM
Tuning AIX IO theerthan UNIX e avanzata per utenti esperti 1 04-06-2008 09:12 AM
SAS Tuning alex blanco UNIX e avanzata per utenti esperti 1 07-10-2007 12:08 PM
Apache Tuning edkung UNIX e avanzata per utenti esperti 2 08-13-2003 01:30 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Cerca in questo Thread Rating: Thread Rating: 2 votes, 5.00 average. Modalità di visualizzazione
  #1 (permalink)  
Old 08-01-2008
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Località: Asia-Pacifico
Messaggi: 6.703
MySQL Tuning Strumenti con mysqltuner.pl e-tuning primer.sh

Siamo stati recentemente messa a punto di MySQL e mi sono imbattuto accoss due utili strumenti che potrebbero essere interessati a:
  1. mysqltuner.pl
  2. tuning-primer.sh

Entrambi questi script sono molto utili per la messa a punto di MySQL. Ecco alcuni esempi di output di mysqltuner.pl

Codice:
 >>  MySQLTuner 0.9.8 - Major Hayden <major@mhtx.net>
 >>  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.51a-3ubuntu5.1-log
[OK] Operating on 32-bit architecture with less than 2GB RAM

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated -InnoDB -ISAM -NDBCluster 
[--] Data in MyISAM tables: 525M (Tables: 385)
[--] Data in MEMORY tables: 1M (Tables: 4)
[!!] Total fragmented tables: 19

-------- Performance Metrics -------------------------------------------------
[--] Up for: 2h 48m 41s (562K q [55.592 qps], 48K conn, TX: 177M, RX: 164M)
[--] Reads / Writes: 77% / 23%
[--] Total buffers: 3.0M per thread and 354.0M global
[OK] Maximum possible memory usage: 1.5G (76% of installed RAM)
[OK] Slow queries: 3% (21K/562K)
[OK] Highest usage of available connections: 7% (29/400)
[OK] Key buffer size / total MyISAM indexes: 128.0M/309.2M
[OK] Key buffer hit rate: 100.0%
[OK] Query cache efficiency: 60.6%
[OK] Query cache prunes per day: 0
[!!] Sorts requiring temporary tables: 13%
[OK] Temporary tables created on disk: 12%
[OK] Thread cache hit rate: 99%
[OK] Table cache hit rate: 94%
[OK] Open file limit used: 44%
[OK] Table locks acquired immediately: 99%

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
Variables to adjust:
    sort_buffer_size (> 1M)
    read_rnd_buffer_size (> 524K)
ed ecco alcuni esempi di output di tuning-primer.sh

Codice:
mysqld is alive

        -- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -

MySQL Version 5.0.51a-3ubuntu5.1-log i486

Uptime = 0 days 2 hrs 55 min 42 sec
Avg. qps = 55
Total Questions = 584995
Threads Connected = 4

Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html
Visit http://www.mysql.com/products/enterprise/advisors.html
for info about MySQL's Enterprise Monitoring and Advisory Service

SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 5 sec.
You have 21921 out of 585073 that take longer than 5 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
See http://dev.mysql.com/doc/refman/5.0/en/point-in-time-recovery.html

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 6
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 400
Current threads_connected = 2
Historic max_used_connections = 29
The number of used connections is 7% of the configured maximum.
You are using less than 10% of your configured max_connections.
Lowering max_connections could help to avoid an over-allocation of memory
See "MEMORY USAGE" section to make sure you are not over-allocating

MEMORY USAGE
Max Memory Ever Allocated : 425 M
Configured Max Per-thread Buffers : 1 G
Configured Max Global Buffers : 338 M
Configured Max Memory Limit : 1 G
Physical Memory : 1.97 G
Max memory limit seem to be within acceptable norms

KEY BUFFER
Current MyISAM index space = 309 M
Current key_buffer_size = 128 M
Key cache miss rate is 1 : 2158
Key buffer fill ratio = 17.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere

QUERY CACHE
Query cache is enabled
Current query_cache_size = 200 M
Current query_cache_used = 25 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 12.95 %
Current query_cache_min_res_unit = 4 K
Your query_cache_size seems to be too high.
Perhaps you can use these resources elsewhere
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current read_rnd_buffer_size = 524 K
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 256.00 K
You have had 18 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.

Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.

OPEN FILES LIMIT
Current open_files_limit = 2000 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

TABLE CACHE
Current table_cache value = 550 tables
You have a total of 406 tables
You have 498 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 5632 temp tables, 13% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 204 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 761
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrency of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.
Molto utile, a mio parere.
 

Segnalibri

Tag
mysql, mysqltuner.pl, performance tuning, tuning-primer.sh

Thread Tools Cerca in questo Thread
Cerca in questo Thread:

Ricerca Avanzata
Modalità di visualizzazione Vota questo thread
Vota questo thread:

Distacco regolamento
Tu non può post nuovo thread
Tu non può inviare una risposta
Tu non può postare allegati
Tu non può modificare i tuoi post

BB codice è Su
Smilies sono Su
[IMG] codice Su
Codice HTML è Chiuso
Trackbacks sono Su
Pingbacks sono Su
Refbacks sono Su




Tutti gli orari sono GMT -4. La data di oggi è 07:46 AM.


Powered by: vBulletin, Copyright © 2000 - 2006, Jelsoft Enterprises Limited. Traduzioni Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
UNIX e Linux Forum Content Copyright © 1993-2009. Tutti i diritti Reserved.Ad di gestione da RedTyger

Contenuti pertinenti URL da vBSEO 3.2.0