使用sysbench测试mysql性能的操作步骤-创新互联

下文给大家带来关于使用sysbench测试mysql性能的操作步骤,感兴趣的话就一起来看看这篇文章吧,相信看完使用sysbench测试mysql性能的操作步骤对大家多少有点帮助吧。

为山丹等地区用户提供了全套网页设计制作服务,及山丹网站建设行业解决方案。主营业务为网站建设、成都网站制作、山丹网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

sysbench测试mysql性能:

安装sysbench 1.0:

apt-get install bzr automake libtool libmysqlclient-dev pkg-config unzip

ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.14 /usr/lib/libmysqlclient_r.so

wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"

unzip sysbench-1.0.zip

cd sysbench-1.0

./autogen.sh

./configure

make && make install

1.0的oltp.lua路径为--test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua

file I/O performance  (文件I/O性能)
scheduler performance  (调度性能)
memory allocation and transfer speed  (内存分配和传输速度)
POSIX threads implementation performance  (POSIX线程执行绩效)
database server performance (OLTP benchmark)(数据库服务器性能)

测试CPU:

/usr/local/bin/sysbench --test=cpu --cpu-max-prime=2000 --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run

测试线程:

/usr/local/bin/sysbench --test=threads --threads=500 --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run

测试IO:

准备:

/usr/local/bin/sysbench --test=fileio --file-total-size=2G --file-test-mode=rndrw --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx prepare

测试:

/usr/local/bin/sysbench --test=fileio --file-total-size=2G --file-test-mode=rndrw --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run

清理:

/usr/local/bin/sysbench --test=fileio --file-total-size=2G --file-test-mode=rndrw --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx cleanup

测试内存:

/usr/local/bin/sysbench --test=memory --memory-block-size=8k --memory-total-size=1G --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run

测试mutex(互斥性能测试):

/usr/local/bin/sysbench --test=mutex --num-threads=100 --mutex-num=100 --mutex-locks=100000 --mutex-loops=10000 --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run

测试OLTP(数据库服务器性能):

准备:

/usr/local/bin/sysbench --test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=complex --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxxx prepare

只读测试:

/usr/local/bin/sysbench --test=./sysbench-1.0/tests/include/oltp_legacy/oltp_simple.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=simple --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxx run

读写混合测试:

/usr/local/bin/sysbench  --test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=complex --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxx run

清理:

/usr/local/bin/sysbench --test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=complex --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxx cleanup

看了以上关于使用sysbench测试mysql性能的操作步骤详细内容,是否有所收获。如果想要了解更多相关,可以继续关注我们的行业资讯板块。

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。

分享题目:使用sysbench测试mysql性能的操作步骤-创新互联
网页网址:https://www.cdcxhl.com/article36/pijsg.html

成都网站建设公司_创新互联,为您提供网站收录小程序开发移动网站建设定制开发全网营销推广网站设计公司

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

h5响应式网站建设