sysbench与sqlyog的安装和使用

来源:互联网 发布:java 获取每个月一号 编辑:程序博客网 时间:2024/06/04 20:09

sysbench与sqlyog的安装和使用

sysbench

sysbench是一款开源的多线程性能测试工具,可以执行CPU/内存/线程/IO/数据库等方面的性能测试。

默认支持MySQL,如果需要测试Oracle/PostgreSQL,则在configure时需要加上–with-oracle或者–with-pgsql参数

安装
RHEL/CentOS

yum -y install sysbench

Fedora

dnf -y install sysbench


Debian/Ubunu

apt -y install sysbench


我的环境是centOS6.5
Installed:  sysbench.i686 0:0.4.12-5.el6                                                  Complete![root@wuwu1 ~]# 


在工具创建一个测试表

[root@wuwu1 src]# sysbench --test=oltp --mysql-host=localhost --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=root --mysql-password=12345 --db-driver=mysql --mysql-db=test preparesysbench 0.4.12:  multi-threaded system evaluation benchmarkCreating table 'sbtest'...Creating 1000000 records in table 'sbtest'...

执行测试


[root@wuwu1 src]# sysbench --test=oltp --mysql-host=localhost --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=root --mysql-password=12345 --db-driver=mysql --mysql-db=test runsysbench 0.4.12:  multi-threaded system evaluation benchmarkRunning the test with following options:Number of threads: 1Doing OLTP test.Running mixed OLTP testUsing Special distribution (12 iterations,  1 pct of values are returned in 75 pct cases)Using "BEGIN" for starting transactionsUsing auto_inc on the id columnMaximum number of requests for OLTP test is limited to 10000Threads started!Done.OLTP test statistics:    queries performed:        read:                            140000        write:                           50000        other:                           20000        total:                           210000    transactions:                        10000  (128.45 per sec.)    deadlocks:                           0      (0.00 per sec.)    read/write requests:                 190000 (2440.53 per sec.)    other operations:                    20000  (256.90 per sec.)Test execution summary:    total time:                          77.8519s    total number of events:              10000    total time taken by event execution: 77.7487    per-request statistics:         min:                                  3.18ms         avg:                                  7.77ms         max:                                393.10ms         approx.  95 percentile:              19.89msThreads fairness:    events (avg/stddev):           10000.0000/0.00    execution time (avg/stddev):   77.7487/0.00

SQLyog

SQLyog是一个易于使用的、快速而简洁的图形化管理MYSQL数据库的工具,它能够在任何地点有效地管理你的数据库!

官方网站: http://www.webyog.com

项目地址: https://github.com/webyog/sqlyog-community

下载地址: https://github.com/webyog/sqlyog-community/wiki/Downloads





0 0