The UNIX and Linux Forums  


Go Back   UNIXおよびLinuxフォーラム > スペシャルフォーラム > Webプログラミング、ウェブ2.0とマッシュアップ
Googleのunix.com



Webプログラミング、ウェブ2.0とマッシュアップ ランプ、 Apacheのは、 MySQLは、 FlashやHTML 、 SEOの、マッシュアップ、他のWeb APIやトピックなどのWebプログラミングおよびWebサーバーの管理について説明します。

その他のUNIXおよびLinuxフォーラムトピックは参考にすること
スレッド スレッドスターター フォーラム 返信 最後の投稿
チューニング naresh.sun Sun Solaris 4 2008年5月21日 02:25午前
AIXのチューニングのIO theerthan UNIXの詳細&エキスパートのためのユーザー 1 2008年4月6日 10:12午前
SAをチューニング アレックスブランコ UNIXの詳細&エキスパートのためのユーザー 1 2007年7月10日 01:08午後
Apacheのチューニング edkung UNIXの詳細&エキスパートのためのユーザー 2 2003年8月13日 02:30午後

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek を搭載 Powered by Google
 
LinkBack スレッドツール このスレッドを検索 評価: Thread Rating: 2 votes, 5.00 average. 表示モード
  #1固定リンク)  
Old 2008年8月1日
Neo's Avatar
ネオ Neo is offline Forum Staff  
管理者
  
 

参加日: 2000年09月
場所:アジア太平洋地域
投稿数:6797
MySQLのチューニングツールmysqltuner.plやチューニングをprimer.sh

私たちは最近、 MySQLのチューニングをして、もう2つの便利なツールaccossに興味があるかもしれないが走った:
  1. mysqltuner.pl
  2. チューニング- primer.sh

両方のMySQLの場合はこれらのスクリプトのチューニングはかなり便利です。ここのいくつかのサンプル出力ですmysqltuner.pl


コード:
 >>  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)

チューニングとここからいくつかのサンプル出力ですprimer.sh


コード:
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'.

私の意見非常に便利です。
  #2固定リンク)  
Old 2008年8月6日
利得 gain is offline
登録ユーザー
  
 

参加日: 2008年8月
記事: 1
Question メモリ使用量と一致しない

やあ!

私も今のところ、これらのツールの両方を使用してきました。ただし、両方の出力に注目すると、メモリ使用量よりも少ないですから返さtuning_primer.sh mysqltuner.plが表示されます。

さて、これらの2つは、正しいものを言っている?

任意のアイデアですか?
  #3固定リンク)  
Old 2008年10月14日
Neo's Avatar
ネオ Neo is offline Forum Staff  
管理者
  
 

参加日: 2000年09月
場所:アジア太平洋地域
投稿数:6797
メモリ番号の両方を修正している。するのは、リンゴとオレンジを比較しています。
  #4固定リンク)  
Old 2008年12月6日
shantanuo shantanuo is offline
登録ユーザー
  
 

参加日: 2008年8月
場所:ムンバイ
投稿: 79
> >非常に、私の意見では役に立つ。

はい、確かに。
Reply

ブックマーク

タグ
MySQLのmysqltuner.plパフォーマンスチューニングチューニング- primer.sh

スレッドツール このスレッドを検索
このスレッドを検索

高度な検索
表示モード このスレッド
このスレッド

投稿ルール
あなた ことができない。 新しいスレッドを投稿
あなた ことができない。 返信の投稿
あなた ことができない。 添付ファイルの投稿
あなた ことができない。 自分の投稿を編集

BBコード なる 〜の上に
スマイリー なる 〜の上に
[イメージ] コードは 〜の上に
HTMLコードは、 オフ
トラックバック なる 〜の上に
ピングバック なる 〜の上に
Refbacks なる 〜の上に




すべてGMT -4です。現在の時刻は 04:50午前


提供: vBulletin、著作権© 2000 - 2006、Jelsoft企業株式会社。言語翻訳による電源
vBCredits v1.4著作権© 2007 - 2008 、 PixelFXスタジオ
は、 UNIXおよびLinuxフォーラムのコンテンツ著作権© 1993 〜 2009 。すべての権利を管理しReserved.Ad RedTyger

コンテンツ関連のURLで vBSEO 3.2.0