CentOS下性能测试工具susbench,centossusbench


susbench性能测试工具:


1、cpu性能


2、磁盘io性能


3、调度程式性能


4、内存分配及传输速度


5、POSIX线程性能


6、数据库性能(OLTP基准测试)现在sysbench主要支持MySQL,pgsql,oracle 这3种数据库


centos6下面测试的


安装:


yum installhttp://dl.fedoraproject.org/pub/epel/6/x86_64//sysbench-0.4.12-5.el6.x86_64.rpm


测试cpu:


sysbench --test=cpu --num-threads=500 --cpu-max-prime=2000 run


测试程式性能:


sysbench --test=threads --num-threads=500 --thread-yields=100 --thread-locks=4 run


测试磁盘IO:


准备测试文件:


sysbench --test=fileio --num-threads=16 --file-total-size=2G --file-test-mode=rndrw prepare


进入测试阶段:


sysbench --test=fileio --num-threads=20 --file-total-size=2G --file-test-mode=rndrwrun


清理这些小文件:


sysbench --test=fileio --num-threads=20 --file-total-size=2G --file-test-mode=rndrw cleanup


测试内存:


sysbench --test=memory --memory-block-size=1M --memory-total-size=10G run


测试mutex:


sysbench –test=mutex –num-threads=100 –mutex-num=1000 –mutex-locks=100000 –mutex-loops=10000 run


测试数据库性能:


准备数据


sysbench --test=oltp --db-driver=mysql --mysql-table-engine=innodb --mysql-host=192.168.X.X --mysql-db=test --oltp-table-size=500000 --mysql-user=root --mysql-password=123456 prepare


测试数据:


sysbench --num-threads=16 --test=oltp --db-driver=mysql --mysql-table-engine=innodb --mysql-host=192.168.x.x --mysql-db=test --oltp-table-size=500000 --mysql-user=root --mysql-password=123456 run


清理数据:


sysbench --num-threads=16 --test=oltp --db-driver=mysql --mysql-table-engine=innodb --mysql-host=192.168.x.x --mysql-db=test --oltp-table-size=500000 --mysql-user=root --mysql-password=123456 cleanup

相关内容

    暂无相关文章