如何安装使用sysbench
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,本篇文章为大家展示了如何安装使用sysbench,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。yum -y install make automake lib
千家信息网最后更新 2026年11月02日如何安装使用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安全错误
数据库的锁怎样保障安全
互联网科技企业
深圳恒合互联网络科技有限公司
互联网科技会
与互联网科技公司
互联网与新科技
北京禾田雨橡互联网科技
互联网金融 科技创新
四川狮子座互联网科技
国外互联网科技网站
左右互联网络科技
互联网公司会议桌创意科技软装饰
互联网科技产品
互联网软件和科技
武汉健翔互联网络科技有限公司
互联网与医疗科技
用友工业互联网科技发展
互联网科技实习生岗位
广州三三互联网科技有限公司
科技和互联网行业的特点
北京军民互联网科技公司
平安科技 互联网
互联网科技ppt模板
火传媒上海互联网科技
互联网科技与管理
互联网科技人工智能实验室
互联网行业科技股
35岁以上互联网科技行业
互联网科技包装股
互联网科技平台产品运营
互联网领先科技成果宣传视频