In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to install and use sysbench, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.
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
Environment variables need to be set
[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 tps 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 ms,95% 1347.1919max 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.90max 1367.74) 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 qps) lat (ms) 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 execution time (avg/stddev): 19.9997Universe 0.00 the above is how to install and use sysbench Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.