bencher-a benchmarking utility for MySQL Custer(転帖)
2333 ワード
原文の由来:http://johanandersson.blogspot.com/2009/03/bencher-benchmarking-utility-...
Clauster.I have used this utility a lot of customers,because it lets
私:specify a simple query that I want to benchmark on the command line implement more complex use cases implement NDBAPI requests and
I don't have to reinvent the wheel evertime.It is all there:
connectivity,multi-threading support,timers,and some baic
statistics,and it comples on most plotforms.I just have to focus on
the queries I want to optimize or benchmark.
The simple use case
is to specify the SQL query you want to benchmark,the number of
threads,and how many times.You can also customize this very easityto
benchmark more elaboorate SQL requsts,and NDBAPI requests.
bencher
is a test program that allows you to benchmark requests on MySQLClauster.I have used this utility a lot of customers,because it lets
私:
I don't have to reinvent the wheel evertime.It is all there:
connectivity,multi-threading support,timers,and some baic
statistics,and it comples on most plotforms.I just have to focus on
the queries I want to optimize or benchmark.
The simple use case
is to specify the SQL query you want to benchmark,the number of
threads,and how many times.You can also customize this very easityto
benchmark more elaboorate SQL requsts,and NDBAPI requests.
bencher
output per thread statistics and total throughput:
./src/bencher -s /tmp/mysql.sock.3306 -t 2 -l 10000 -q "select * from t1 limit 1"
------- Starting Benchmark ----------
Thread 1 - 638 qps (average qps measured after 5 secs)
Thread 0 - 631 qps (average qps measured after 5 secs)
Thread 1 - 680 qps (average qps measured after 10 secs)
Thread 0 - 679 qps (average qps measured after 10 secs)
------- Benchmark Finished ----------
Thread 0 - max: 83091 us, min 668 us, less than 5 ms: 9761 of 10000, avg: 1485 us, total time: 14949 ms, qps: 668.91
Thread 1 - max: 43743 us, min 578 us, less than 5 ms: 9770 of 10000, avg: 1475 us, total time: 14767 ms, qps: 677.16
Total throughput = 1346.08 qps
Average exec time per thread = 14.86 secs
You
can also specify a "querytime-threshold", to see how many transaction
have executed under a certain time (default is 5 ms). From the above
you can see that for this particular query
9760/10000
requess finished within 5 ms。
“MySQL ” http://www.imysql.cn/
・