mysql相关开源工具
2011-02-23 13:46
204 查看
MySQL 扩展和优化工具 Google MySQL Tools
Google MySQL Tools 是一组用来管理、维护和提升 MySQL 数据库性能的工具,由 Google 公司开发。
该工具目前包括:
mypgrep.py - a tool, similar to pgrep, for managing mysql connections
compact_innodb.py - compacts innodb datafiles by dumping and reloading all tables
patches - patches to add features to MySQL 4.0.26 and MySQL 5.0.37
MySQL 的 5.4 版本就是基于该工具进行扩展的。
MySQL压力测试工具 mysqlslap
mysqlslap是一个mysql官方提供的压力测试工具。以下是比较重要的参数:
–defaults-file,配置文件存放位置
–concurrency,并发数
–engines,引擎
–iterations,迭代的实验次数
–socket,socket文件位置
自动测试:
–auto-generate-sql,自动产生测试SQL
–auto-generate-sql-load-type,测试SQL的类型。类型有mixed,update,write,key,read。
–number-of-queries,执行的SQL总数量
–number-int-cols,表内int列的数量
–number-char-cols,表内char列的数量
例如:
shell>mysqlslap –defaults-file=/u01/mysql1/mysql/my.cnf –concurrency=50,100 –iterations=1 –number-int-cols=4 –auto-generate-sql –auto-generate-sql-load-type=write –engine=myisam –number-of-queries=200 -S/tmp/mysql1.sock
Benchmark
Running for engine myisam
Average number of seconds to run all queries: 0.016 seconds
Minimum number of seconds to run all queries: 0.016 seconds
Maximum number of seconds to run all queries: 0.016 seconds
Number of clients running queries: 50
Average number of queries per client: 4
Benchmark
Running for engine myisam
Average number of seconds to run all queries: 0.265 seconds
Minimum number of seconds to run all queries: 0.265 seconds
Maximum number of seconds to run all queries: 0.265 seconds
Number of clients running queries: 100
Average number of queries per client: 2
指定数据库的测试:
–create-schema,指定数据库名称
–query,指定SQL语句,可以定位到某个包含SQL的文件
例如:
shell>mysqlslap –defaults-file=/u01/mysql1/mysql/my.cnf –concurrency=25,50 –iterations=1 –create-schema=test –query=/u01/test.sql -S/tmp/mysql1.sock
Benchmark
Average number of seconds to run all queries: 0.018 seconds
Minimum number of seconds to run all queries: 0.018 seconds
Maximum number of seconds to run all queries: 0.018 seconds
Number of clients running queries: 25
Average number of queries per client: 1
Benchmark
Average number of seconds to run all queries: 0.011 seconds
Minimum number of seconds to run all queries: 0.011 seconds
Maximum number of seconds to run all queries: 0.011 seconds
Number of clients running queries: 50
Average number of queries per client: 1
Google MySQL Tools 是一组用来管理、维护和提升 MySQL 数据库性能的工具,由 Google 公司开发。
该工具目前包括:
mypgrep.py - a tool, similar to pgrep, for managing mysql connections
compact_innodb.py - compacts innodb datafiles by dumping and reloading all tables
patches - patches to add features to MySQL 4.0.26 and MySQL 5.0.37
MySQL 的 5.4 版本就是基于该工具进行扩展的。
MySQL压力测试工具 mysqlslap
mysqlslap是一个mysql官方提供的压力测试工具。以下是比较重要的参数:
–defaults-file,配置文件存放位置
–concurrency,并发数
–engines,引擎
–iterations,迭代的实验次数
–socket,socket文件位置
自动测试:
–auto-generate-sql,自动产生测试SQL
–auto-generate-sql-load-type,测试SQL的类型。类型有mixed,update,write,key,read。
–number-of-queries,执行的SQL总数量
–number-int-cols,表内int列的数量
–number-char-cols,表内char列的数量
例如:
shell>mysqlslap –defaults-file=/u01/mysql1/mysql/my.cnf –concurrency=50,100 –iterations=1 –number-int-cols=4 –auto-generate-sql –auto-generate-sql-load-type=write –engine=myisam –number-of-queries=200 -S/tmp/mysql1.sock
Benchmark
Running for engine myisam
Average number of seconds to run all queries: 0.016 seconds
Minimum number of seconds to run all queries: 0.016 seconds
Maximum number of seconds to run all queries: 0.016 seconds
Number of clients running queries: 50
Average number of queries per client: 4
Benchmark
Running for engine myisam
Average number of seconds to run all queries: 0.265 seconds
Minimum number of seconds to run all queries: 0.265 seconds
Maximum number of seconds to run all queries: 0.265 seconds
Number of clients running queries: 100
Average number of queries per client: 2
指定数据库的测试:
–create-schema,指定数据库名称
–query,指定SQL语句,可以定位到某个包含SQL的文件
例如:
shell>mysqlslap –defaults-file=/u01/mysql1/mysql/my.cnf –concurrency=25,50 –iterations=1 –create-schema=test –query=/u01/test.sql -S/tmp/mysql1.sock
Benchmark
Average number of seconds to run all queries: 0.018 seconds
Minimum number of seconds to run all queries: 0.018 seconds
Maximum number of seconds to run all queries: 0.018 seconds
Number of clients running queries: 25
Average number of queries per client: 1
Benchmark
Average number of seconds to run all queries: 0.011 seconds
Minimum number of seconds to run all queries: 0.011 seconds
Maximum number of seconds to run all queries: 0.011 seconds
Number of clients running queries: 50
Average number of queries per client: 1
相关文章推荐
- MySQL的开源热备份工具Xtrabackup1.2
- MYSQL 性能分析工具相关的一个网站
- Android 开源项目android-open-project开发工具及测试工具解析 开发效率工具,开发自测相关,测试工具,开发及编译环境,其他
- 开源Mysql热备份工具Xtrabackup详细学习手册
- MySQL运维相关工具汇总(待补充)
- Sqoop是一款开源的工具,主要用于在HADOOP(Hive)与传统的数据库(mysql、oracle...)间进行数据的传递
- Mysql相关工具
- Mysql开源备份工具Xtrabackup备份部署
- mysql安装图解(详细步骤),配置,相关图形工具介绍及使用,中文支持
- 开源数据库中间件 Vitess:一组旨在使 web 应用的 MySql 数据库的水平扩展简单化的服务器和工具集
- 五大开源MySQL管理工具!
- linux系统安装数据库时,xshell工具常用MySQL(5.5)相关命令
- 开源数据库中间件 Vitess:一组旨在使 web 应用的 MySql 数据库的水平扩展简单化的服务器和工具集
- XtraBackup - 开源MySQL在线热备份工具安装使用
- 去哪儿网mysql语法审核工具Inception正式开源
- XtraBackup - 开源MySQL在线热备份工具概述
- mysql 2款开源的闪回工具基于mysqlbinLog
- CuteFlow基于Web文档流转/工作流工具 国外开源php+mysql
- 关于开源工具Sqoop源码解读----Mysql字符串作为主键主键分片
- mysql误删除数据恢复之二 开源工具binlog2sql