bencher - a benchmarking utility for MySQL Cluster(转帖)
2017-04-13 00:00
555 查看
原文来自:
http://johanandersson.blogspot.com/2009/03/bencher-benchmarking-utility-...
is a test program that allows you to benchmark requests on MySQL
Cluster. I have used this utility a lot of customers, because it lets
me:
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 every time. It is all there:
connectivity, multi-threading support, timers, and some basic
statistics, and it compiles on most platforms. 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 easily to
benchmark more elaborate SQL requsts, and NDBAPI requests.
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
本文出自 “MySQL中文网”博客
http://www.imysql.cn/
http://johanandersson.blogspot.com/2009/03/bencher-benchmarking-utility-...
bencher
is a test program that allows you to benchmark requests on MySQL
Cluster. I have used this utility a lot of customers, because it lets
me:
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 every time. It is all there:
connectivity, multi-threading support, timers, and some basic
statistics, and it compiles on most platforms. 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 easily to
benchmark more elaborate SQL requsts, and NDBAPI requests.
bencheroutputs 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/10000requests finished within 5 ms.
本文出自 “MySQL中文网”博客
http://www.imysql.cn/
相关文章推荐
- bencher - a benchmarking utility for MySQL Cluster(转帖)
- How to Cluster Magento, nginx and MySQL on Multiple Servers for High Availability
- mysql集群的最佳实践 Best Practices For MySQL Cluster (文档 ID 1926680.1)
- HOWTO set up a MySQL Cluster for two servers
- Introduction to MySQL Cluster for MySQL Users
- CentOS 6下安装部署Galera Cluster for MySQL集群
- OpenStack HA集群1-Galera Cluster for Mysql
- Galera Cluster for MySQL
- [置顶] Galera Cluster for MySQL 集群备忘(Centos7)
- Ubuntu 下 Galera cluster for MySQL 集群安装
- Galera Cluster for MySQL
- mysqlbinlog — Utility for Processing Binary Log Files
- Percona XtraDB Cluster 5.5.30-23.7.4 for MySQL
- nginx as Database Load Balancer for MySQL or MariaDB Galera Cluster
- mysql-max for cluster
- Galera Cluster for MySQL启动不了,一直不停的自动重启!
- Eclipse2.1+weblogic8.1+mysql开发工具安装步骤:(for windows os)
- EMS Tools for MySQL AIO
- Introduction to MySQL Cluster
- MYSQL写入中文错误 —— Data too long for column 'xxx' at row 1