如何安装使用sysbench
发表于:2025-02-23 作者:千家信息网编辑
千家信息网最后更新 2025年02月23日,本篇文章为大家展示了如何安装使用sysbench,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。yum -y install make automake lib
千家信息网最后更新 2025年02月23日如何安装使用sysbench
本篇文章为大家展示了如何安装使用sysbench,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
yum -y install make automake libtool pkgconfig libaio-develyum -y install mysql-devel openssl-develunzip sysbench-master.zip ./autogen.sh./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/libmake && make install
需要设置环境变量
[root@dpcm01 sysbench-master]# sysbenchsysbench: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory[root@dpcm01 sysbench-master]# echo $LD_LIBRARY_PATH[root@dpcm01 sysbench-master]# echo $LD_LIBRARY_PATH[root@dpcm01 sysbench-master]# [root@dpcm01 sysbench-master]# export LD_LIBRARY_PATH=/usr/local/mysql/lib[root@dpcm01 sysbench-master]# [root@dpcm01 sysbench-master]# sysbenchsysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)Reading the script from the standard input:[root@dpcm01 lua]# sysbench oltp_read_write.lua --mysql-socket=/data/mysql/mysql.sock --mysql-user=root --mysql-host=localhost \> --mysql-user=root --mysql-host=localhost --mysql-password=123456 --tables=10 --table_size=100000 preparesysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)FATAL: unable to connect to MySQL server on socket '/data/mysql/mysql.sock', aborting...FATAL: error 1049: Unknown database 'sbtest'FATAL: `sysbench.cmdline.call_command' function failed: ./oltp_common.lua:88: connection creation failed[root@dpcm01 lua]# sysbench oltp_read_write.lua --mysql-socket=/data/mysql/mysql.sock --mysql-user=root --mysql-host=localhost --mysql-user=root --mysql-host=localhost --mysql-password=123456 --tables=10 --table_size=100000 preparesysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)Creating table 'sbtest1'...Inserting 100000 records into 'sbtest1'Creating a secondary index on 'sbtest1'...Creating table 'sbtest2'...Inserting 100000 records into 'sbtest2'Creating a secondary index on 'sbtest2'...Creating table 'sbtest3'...Inserting 100000 records into 'sbtest3'Creating a secondary index on 'sbtest3'...Creating table 'sbtest4'...Inserting 100000 records into 'sbtest4'Creating a secondary index on 'sbtest4'...Creating table 'sbtest5'...Inserting 100000 records into 'sbtest5'Creating a secondary index on 'sbtest5'...Creating table 'sbtest6'...Inserting 100000 records into 'sbtest6'Creating a secondary index on 'sbtest6'...Creating table 'sbtest7'...Inserting 100000 records into 'sbtest7'Creating a secondary index on 'sbtest7'...Creating table 'sbtest8'...Inserting 100000 records into 'sbtest8'Creating a secondary index on 'sbtest8'...Creating table 'sbtest9'...Inserting 100000 records into 'sbtest9'Creating a secondary index on 'sbtest9'...Creating table 'sbtest10'...Inserting 100000 records into 'sbtest10'Creating a secondary index on 'sbtest10'...[root@dpcm01 lua]# sysbench --threads=4 \> --time=20 \> --report-interval=5 \> --mysql-host=localhost \> --mysql-port=3306 \> --mysql-user=root \> --mysql-password=123456 --mysql-socket=/data/mysql/mysql.sock \> oltp_read_write.lua \> --tables=10 \> --table_size=100000 \> runsysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)Running the test with following options:Number of threads: 4Report intermediate results every 5 second(s)Initializing random number generator from current timeInitializing worker threads...Threads started![ 5s ] thds: 4 tps: 286.08 qps: 5732.71 (r/w/o: 4013.85/1145.90/572.95) lat (ms,95%): 23.95 err/s: 0.00 reconn/s: 0.00[ 10s ] thds: 4 tps: 337.00 qps: 6740.74 (r/w/o: 4719.55/1347.19/673.99) lat (ms,95%): 23.10 err/s: 0.00 reconn/s: 0.00[ 15s ] thds: 4 tps: 342.04 qps: 6838.71 (r/w/o: 4786.90/1367.74/684.07) lat (ms,95%): 23.10 err/s: 0.00 reconn/s: 0.00[ 20s ] thds: 4 tps: 344.79 qps: 6893.70 (r/w/o: 4824.79/1379.34/689.57) lat (ms,95%): 24.38 err/s: 0.00 reconn/s: 0.00SQL statistics: queries performed: read: 91756 write: 26216 other: 13108 total: 131080 transactions: 6554 (327.39 per sec.) queries: 131080 (6547.79 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)Throughput: events/s (eps): 327.3896 time elapsed: 20.0190s total number of events: 6554Latency (ms): min: 4.88 avg: 12.21 max: 398.72 95th percentile: 23.95 sum: 79998.74Threads fairness: events (avg/stddev): 1638.5000/9.10 execution time (avg/stddev): 19.9997/0.00
上述内容就是如何安装使用sysbench,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注行业资讯频道。
内容
技能
知识
简明
简明扼要
变量
就是
文章
更多
环境
篇文章
行业
资讯
资讯频道
频道
一亮
储备
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
在创建数据库后应该怎么做
包头烽泰软件开发有限公司
杨浦区网络技术服务咨询价钱
网络安全宣传国旗下讲话稿
物流软件开发哪家公司好
网络安全监督实施方案
浏览器登录服务器提示未知异常
科技互联网老总
邢台共青团网络安全吗
火绒服务器安全
湖北时代网络技术分类标准
中华期刊全文数据库官网
涛思数据库企业版价格
获取服务器的ssl证书
数据库边插边读取
aig 企业网络安全保险
计算机网络技术与应用试卷
华东师大公用数据库
海淀区软件开发价格优惠
上海铎鸿网络技术有限公司
如何维护网络安全问题
怎么清除数据库所有数据
全国计算机网络技术视频教程
崇明区参考数据库研发厂家报价
2019年铁路网络安全活动总结
数据库in 2008
数据库怎么把数据相加
软件开发测试国外兼职
上海马少网络技术有限公司
网络安全周报360