In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shares with you the content of a sample analysis of the Sysbench benchmark. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Sysbench, like TPCC-MySQL, is a benchmarking tool.
TPCC-MySQL
Http://blog.itpub.net/29254281/viewspace-1195589/
You can benchmark not only MySQL but also Oracle,PostgreSQL relative to TPCC-MySQL,Sysbench.
Source code download address:
Https://launchpad.net/sysbench
Download the dependency package first
Yum install automake autoconf-y
When you run the command. / configure & & make, you may have the following error
.. / libtool: line 5172:: command not found
Modify the configure.ac file
Annotate LIBTOOL and add AC_PROG_RANLIB
After modification, run the following command
. / autogen.sh & &. / configure & & make
When you're done, go to the sysbench folder and you can see that the sysbench command has been compiled.
1. Conduct file IO testing
Prepare the document
Conduct a benchmark test
[root@mysql1 sysbench] # / sysbench-- test=fileio-- file-total-size=2G-- file-test-mode=rndrw-- file-num=16-- num-threads=16 run
Sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 16
Extra file open flags: 0
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync () each 100requests.
Calling fsync () at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Done.
Operations performed: 6006 Read, 3996 Write, 1600 Other = 11602 Total
Read 93.844Mb Written 62.438Mb Total transferred 156.28Mb (2.1231Mb/sec)
135.88 Requests/sec executed
Test execution summary:
Total time: 73.6086s
Total number of events: 10002
Total time taken by event execution: 602.0152
Per-request statistics:
Min: 0.01ms
Avg: 60.19ms
Max: 1587.11ms
Approx. 95 percentile: 290.98ms
Threads fairness:
Events (avg/stddev): 625.1250ax 42.01
Execution time (avg/stddev): 37.6259 + 2.94
Where the main parameters and default values
-- number of files created by file-num=N for testing [128]
-- the size of the file-block-size=N block. The default is 16K for testing Oracle. It is generally changed to 8K [16384].
-- the total size of all file-total-size=SIZE test files [2G]
-- file-test-mode=STRING test mode seqwr (sequential write), seqrewr (sequential read and write), seqrd (sequential read), rndrd (random read), rndwr (random write), rndrw (random read and write)
-- file-io-mode=STRING file operation mode sync (synchronous), async (asynchronous), fastmmap,slowmmap (two memory mapping modes) [sync]
-- read-write ratio during file-rw-ratio=N testing [1.5]
-file-async-backlog=N number of asynchronous operatons to queue per thread [128]
-- file-extra-flags=STRING additional flags to use on opening files {sync,dsync,direct} []
-- file-fsync-freq=N do fsync () after this number of requests (0-don't use fsync ())
-- file-fsync-all= [on | off] do fsync () after each write operation [off]
-- file-fsync-end= [on | off] do fsync () at the end of test [on]
-- file-fsync-mode=STRING which method to use for synchronization {fsync, fdatasync} [fsync]
-- file-merged-requests=N merge at most this number of IO requests if possible (0-don't merge) [0]
Clean up the generated files after the test is complete
[root@mysql1 sysbench] # / sysbench-- test=fileio-- file-num=16-- file-total-size=2G cleanup
Sysbench 0.4.12: multi-threaded system evaluation benchmark
Removing test files...
If the following error occurs, it is important to note that the specified file-num is divisible by file-total-size
FATAL: Too large position discovered in request!
two。 Conduct CPU benchmark testing
[root@mysql1 sysbench] # / sysbench-- test=cpu-- num-threads=16 run
Sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 16
Doing CPU performance benchmark
Threads started!
Done.
Maximum prime number checked in CPU test: 10000
Test execution summary:
Total time: 2.5106s
Total number of events: 10000
Total time taken by event execution: 39.3201
Per-request statistics:
Min: 0.30ms
Avg: 3.93ms
Max: 43.80ms
Approx. 95 percentile: 15.07ms
Threads fairness:
Events (avg/stddev): 625.0000bot 50.60
Execution time (avg/stddev): 2.4575 Universe 0.03
3.OLTP benchmark test
Make preparations
[root@mysql1 sysbench] # / sysbench-- test=oltp-- mysql-table-engine=innodb-- oltp-table-size=1000000-- mysql-host=127.0.0.1-- mysql-user=xx-- mysql-password=xx-- mysql-socket=/home/lihuilin/mysql-5.6.14/mysql.sock-- num-threads=15 prepare
Sysbench 0.4.12: multi-threaded system evaluation benchmark
No DB drivers specified, using mysql
Creating table 'sbtest'...
Creating 1000000 records in table 'sbtest'...
And then test it.
[root@mysql1 sysbench] # / sysbench-- test=oltp-- mysql-table-engine=innodb-- oltp-table-size=1000000-- mysql-host=127.0.0.1-- mysql-user=xx-- mysql-password=xx-- mysql-socket=/home/lihuilin/mysql-5.6.14/mysql.sock-- num-threads=15 run
Sysbench 0.4.12: multi-threaded system evaluation benchmark
No DB drivers specified, using mysql
Running the test with following options:
Number of threads: 15
Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations, 1 pct of values are returned in 75 pct cases)
Using "BEGIN" for starting transactions
Using auto_inc on the id column
Maximum number of requests for OLTP test is limited to 10000
Threads started!
Done.
OLTP test statistics:
Queries performed:
Read: 140000
Write: 50000
Other: 20000
Total: 210000
Transactions: 10000 (502.61 per sec.)
Deadlocks: 0 (0.00 per sec.)
Read/write requests: 190000 (9549.53 per sec.)
Other operations: 20000 (1005.21 per sec.)
Test execution summary:
Total time: 19.8963s
Total number of events: 10000
Total time taken by event execution: 298.1265
Per-request statistics:
Min: 11.62ms
Avg: 29.81ms
Max: 185.70ms
Approx. 95 percentile: 42.60ms
Threads fairness:
Events (avg/stddev): 666.6667 Universe 5.69
Execution time (avg/stddev): 19.8751 Universe 0.01
Compared with TPCC-MySQL,sysbench, the test results are very intuitive and clear at a glance.
Thank you for reading! This is the end of this article on "sample Analysis of Sysbench benchmarking". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.