The UNIX and Linux Forums  
Hallo en welkom van de Verenigde Staten aan de UNIX en Linux Forum! Bedankt voor uw bezoek en Deelnemen aan onze wereldwijde gemeenschap.

Go Back   De Unix-en Linux Forum > Speciale Forums > Web Programmeren, Web 2.0 en mash-ups
.
google unix.com



Web Programmeren, Web 2.0 en mash-ups Bespreek Web Programmeren en Web Server Administration, waaronder LAMP, Apache, MySQL, Flash, HTML, SEO, mash-ups en andere web-API's en onderwerpen.

Meer UNIX en Linux Forum Onderwerpen Misschien vindt u Helpful
Draad Thread Starter Forum Antwoorden Last Post
tuning naresh.sun SUN Solaris 4 05-21-2008 01:25
Tuning AIX IO theerthan UNIX for Advanced & Expert Gebruikers 1 04-06-2008 09:12
SAS Tuning linasita blanco UNIX for Advanced & Expert Gebruikers 1 07-10-2007 12:08
Tuning Apache edkung UNIX for Advanced & Expert Gebruikers 2 08-13-2003 01:30 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Zoeken in deze Thread Waardering: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 08-01-2008
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Locatie: Azië Pacific
Berichten: 6.686
MySQL Tuning Tools met mysqltuner.pl en tuning-primer.sh

Wij hebben tuning MySQL laatste tijd en ik liep accoss twee nuttige hulpprogramma's die u wellicht geïnteresseerd in:
  1. mysqltuner.pl
  2. tuning-primer.sh

Beide scripts zijn zeer nuttig voor MySQL afstemmen. Hier is een aantal voorbeelduitvoer van mysqltuner.pl

Code:
 >>  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)
en hier is een voorbeeld output van tuning-primer.sh

Code:
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'.
Erg handig, in mijn opinie.
  #2 (permalink)  
Old 08-06-2008
winnen gain is offline
Geregistreerde gebruiker
  
 

Join Date: Aug 2008
Krabbels: 1
Question Geheugengebruik komen niet overeen

Hoi!

Ik gebruik deze beide instrumenten voor ergens nu. Echter, als je kijkt naar beide uitgangen ziet u dat het geheugen gebruik geretourneerd door tuning_primer.sh korter is dan die van mysqltuner.pl.

Nu, welke van deze twee vertellen de juiste is?

Any ideas?
  #3 (permalink)  
Old 10-14-2008
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Locatie: Azië Pacific
Berichten: 6.686
Het geheugen nummers zijn beide juist. U vergelijkt appelen en sinaasappelen.
  #4 (permalink)  
Old 12-06-2008
shantanuo shantanuo is offline
Geregistreerde gebruiker
  
 

Join Date: Aug 2008
Locatie: Mumbai
Posts: 79
>> Zeer nuttig zijn, in mijn opinie.

ja, inderdaad.
Reply

Bladwijzers

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

Thread Tools Zoeken in deze Thread
Zoeken in deze Thread:

Uitgebreid zoeken
Display Modes Beoordeel deze draad
Beoordeel deze draad:

Posting Regels
Jij mag niet Post Nieuwe threads
Jij mag niet na antwoorden
Jij mag niet post attachments
Jij mag niet bewerk uw berichten

BB code is Aan
Smilies zijn Aan
[IMG] code Aan
HTML-code is Uit
Trackbacks zijn Aan
Pingbacks zijn Aan
Refbacks zijn Aan




Alle tijden zijn GMT -4. Het is nu 10:31 PM.


Powered by: vBulletin, Copyright © 2000 - 2006, Jelsoft Enterprises Limited. Vertalingen Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
De Unix-en Linux Forums Copyright © 1993-2009. Alle rechten Reserved.Ad Beheer door RedTyger

Content Relevante URL's door vBSEO 3.2.0