In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to conduct sysbench testing, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Sysbench supports the following test modes:
1. CPU computing performance
2. Disk IO performance
3. Scheduler performance
4. Memory allocation and transmission speed
5. POSIX thread performance
6. Database performance (OLTP benchmark)
Sysbench version:
[root@127-0-0-1 sysbench] # / u01/opt/sysbench/bin/sysbench-- version
Sysbench 1.1.0
CPU Test:
[root@127-0-0-1 sysbench] # / u01/opt/sysbench/bin/sysbench cpu--cpu-max-prime=10000 run
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Prime numbers limit: 10000
Initializing worker threads...
Threads started!
CPU speed:
Events per second: 658.31
Throughput:
Events/s (eps): 658.3125
Time elapsed: 10.0013s
Total number of events: 6584
Latency (ms):
Min: 1.44
Avg: 1.52
Max: 3.07
95th percentile: 1.52
Sum: 9998.21
Threads fairness:
Events (avg/stddev): 6584.0000Universe 0.00
Execution time (avg/stddev): 9.9982 plus 0.00
Thread testing:
[root@127-0-0-1 sysbench] # / u01/opt/sysbench/bin/sysbench threads help
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Threads options:
-- thread-yields=N number of yields to do per request [1000] # Revenue efficiency to be executed per request [1000]
-- thread-locks=N number of locks per thread [8] # number of locks per thread [8]
[root@127-0-0-1 sysbench] # / u01/opt/sysbench/bin/sysbench threads-- thread-yields=1000-- thread-locks=2 run
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Initializing worker threads...
Threads started!
Throughput:
Events/s (eps): 1349.6979
Time elapsed: 10.0008s
Total number of events: 13498
Latency (ms):
Min: 0.73
Avg: 0.74
Max: 1.50
95th percentile: 0.74
Sum: 9996.37
Threads fairness:
Events (avg/stddev): 13498.0000Universe 0.00
Execution time (avg/stddev): 9.9964Universe 0.00
Disk IO test:
[root@127-0-0-1 sysbench] # / u01/opt/sysbench/bin/sysbench fileio help
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Fileio options:
-- file-num=N number of files to create represents the number of generated files.
-- file-block-size=N block size to use in all IO operations [16384] # Block size used in all IO operations [16384]
-- file-total-size=SIZE total size of files to create [2G] # Total size of the file to be created [2G]
-- file-test-mode=STRING test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw} # Test Mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}
-- file-io-mode=STRING file operations mode {sync,async,mmap} [sync] # File operation mode {sync,async,mmap} [sync]
-- file-async-backlog=N number of asynchronous operatons to queue per thread [128] # number of asynchronous operations to queue per thread [128]
-- file-extra-flags= [LIST,...] List of additional flags to use to open files {sync,dsync,direct} [] # list of additional flags used to open files {sync,dsync,direct} []
-- file-fsync-freq=N do fsync () after this number of requests (0-don't use fsync ()) [100] # how often the fsync () function is executed. Fsync mainly synchronizes disk files because there may be a relationship between system and disk buffering. 0 means that the fsync function is not used. The default value is 100.
-- file-fsync-all [= on | off] do fsync () after each write operation [off] # fsync is executed every time a write operation is completed. The default is off.
-- file-fsync-end [= on | off] do fsync () at the end of test [on] # execute the fsync function at the end of the test. The default is on.
-- the choice of file-fsync-mode=STRING which method to use for synchronization {fsync, fdatasync} [fsync] # file synchronization function is also a parameter related to API. Because multiple operating systems support fdatasync differently, fdatasync is not recommended. The default is fsync.
-- file-merged-requests=N merge at most this number of IO requests if possible (0-don't merge) [0] # in most cases, the number of requests for merging possible IO is 0 by default.
-- file-rw-ratio=N reads/writes ratio for combined test [1.5] # the read-write ratio of the test, which defaults to 1.5, is 3:2.
/ u01/opt/sysbench/bin/sysbench fileio-threads=16-file-total-size=2G-file-test-mode=rndrw prepare # prepare
/ u01/opt/sysbench/bin/sysbench fileio-threads=16-file-total-size=2G-file-fsync-freq=0-file-test-mode=rndrw run # run
/ u01/opt/sysbench/bin/sysbench fileio-threads=16-file-total-size=2G-file-test-mode=rndrw cleanup # cleanup
[root@127-0-0-1 yoon] # / u01/opt/sysbench/bin/sysbench fileio-threads=16-file-total-size=2G-file-fsync-freq=0-file-test-mode=rndrw run
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 16
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Calling fsync () at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads...
Threads started!
Throughput:
Read: IOPS=383594.04 5993.66 MiB/s (6284.80 MB/s)
Write: IOPS=255729.12 3995.77 MiB/s (4189.87 MB/s)
Fsync: IOPS=122.71
Latency (ms):
Min: 0.00
Avg: 0.01
Max: 1.73
95th percentile: 0.03
Sum: 144444.71
Memory test:
[root@127-0-0-1 yoon] # / u01/opt/sysbench/bin/sysbench memory help
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Memory options:
-- memory-block-size=SIZE size of memory block for test [1K] # Test memory block size [1K]
-- memory-total-size=SIZE total size of data to transfer [100g] # the total size of the data to be transferred is 100G]
-- memory-scope=STRING memory access scope {global,local} [global] # memory access range {global,local} [global]
-- memory-hugetlb [= on | off] allocate memory from HugeTLB pool [off] # allocate memory from the memory pool [off]
-- memory-oper=STRING type of memory operations {read, write, none} [write] # Storage operation type {read, write, none} [write]
-- memory-access-mode=STRING memory access mode {seq,rnd} [seq] # memory access method {seq,rnd} [seq]
[root@127-0-0-1 yoon] # / u01/opt/sysbench/bin/sysbench memory--memory-total-size=10G-- memory-block-size=8K run
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Running memory speed test with the following options:
Block size: 8KiB
Total size: 10240MiB
Operation: write
Scope: global
Initializing worker threads...
Threads started!
Total operations: 1310720 (1077326.35 per second)
10240.00 MiB transferred with 8416.61 MiB/sec
Throughput:
Events/s (eps): 1077326.3489
Time elapsed: 1.2166s
Total number of events: 1310720
Latency (ms):
Min: 0.00
Avg: 0.00
Max: 0.02
95th percentile: 0.00
Sum: 893.01
Threads fairness:
Events (avg/stddev): 1310720.00000.00
Execution time (avg/stddev): 0.8930Universe 0.00
OLTP Test:
[root@127-0-0-1 sysbench] # ls
Bulk_insert.lua oltp_delete.lua oltp_point_select.lua oltp_read_write.lua oltp_update_non_index.lua prepare.log select_random_ranges.lua
Oltp_common.lua oltp_insert.lua oltp_read_only.lua oltp_update_index.lua oltp_write_only.lua select_random_points.lua tests
/ u01/opt/sysbench/bin/sysbench / u01/opt/sysbench/share/sysbench/oltp_common.lua-mysql-host=127.0.0.1-- mysql-port=3306-- mysql-user=root-- mysql-password='root@01.com'-- mysql-db=sbtest-- table-size=5000000-- threads=10-- report-interval=10 prepare
[root@127-0-0-1 sysbench] # / u01/opt/sysbench/bin/sysbench / u01/opt/sysbench/share/sysbench/oltp_read_write.lua-mysql-host=127.0.0.1-- mysql-port=3306-- mysql-user=root-- mysql-password='root@01.com'-- mysql-db=sbtest-- table-size=5000000-- threads=10-- report-interval=10-- time=120 run
Sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 10
Report intermediate results every 10 second (s)
Initializing random number generator from current time
Initializing worker threads...
Threads started!
[10s] thds: 10 tps: 824.26 qps: 16498.17 (r/w/o: 11550.29) lat (ms,95%): 16.71 err/s: 0.00 reconn/s: 0.00
[20s] thds: 10 tps: 938.90 qps: 18778.84 (r/w/o: 13146.36 tps 3754.69) lat (ms,95%): 13.95 err/s: 0.00 reconn/s: 0.00
[30s] thds: 10 tps: 969.19 qps: 19383.22 (r/w/o: 13568.10 tps 3876.74) lat (ms,95%): 13.70 err/s: 0.00 reconn/s: 0.00
[40s] thds: 10 tps: 1003.32 qps: 20061.71 (r/w/o: 14042.19) lat (ms,95%): 13.22 err/s: 0.00 reconn/s: 0.00
[50s] thds: 10 tps: 1011.57 qps: 20236.34 (r/w/o: 14166.91 tps 4046.29) lat (ms,95%): 13.22 err/s: 0.00 reconn/s: 0.00
[60s] thds: 10 tps: 1115.50 qps: 22309.32 (r/w/o: 15615.94 tps 4462.38) lat (ms,95%): 11.87 err/s: 0.00 reconn/s: 0.00
[70s] thds: 10 tps: 1064.13 qps: 21283.06 (r/w/o: 14898.46 tps) lat (ms,95%): 12.30 err/s: 0.00 reconn/s: 0.00
[80s] thds: 10 tps: 1030.00 qps: 20599.45 (r/w/o: 14419.27) lat (ms,95%): 12.52 err/s: 0.00 reconn/s: 0.00
[90s] thds: 10 tps: 1056.32 qps: 21127.75 (r/w/o: 14790.22 tps) lat (ms,95%): 12.30 err/s: 0.00 reconn/s: 0.00
[100s] thds: 10 tps: 1097.38 qps: 21946.72 (r/w/o: 15362.43 tps 2194.76) lat (ms,95%): 12.30 err/s: 0.00 reconn/s: 0.00
[110s] thds: 10 tps: 1147.39 qps: 22948.97 (r/w/o: 16063.71 + 4590.47) lat (ms,95%): 11.87 err/s: 0.00 reconn/s: 0.00
[120s] thds: 10 tps: 1110.00 qps: 22200.00 (r/w/o: 15540.000.00) lat (ms,95%): 12.08 err/s: 0.00 reconn/s: 0.00
SQL statistics:
Queries performed:
Read: 1731702
Write: 494772
Other: 247386
Total: 2473860
Transactions: 123693 (1030.70 per sec.)
Queries: 2473860 (20614.02 per sec.)
Ignored errors: 0 (0.00 per sec.)
Reconnects: 0 (0.00 per sec.)
Throughput:
Events/s (eps): 1030.7010
Time elapsed: 120.0086s
Total number of events: 123693
Latency (ms):
Min: 4.32
Avg: 9.70
Max: 185.38
95th percentile: 13.22
Sum: 1199649.68
Threads fairness:
Events (avg/stddev): 12369.3000max 304.67
Execution time (avg/stddev): 119.9650Universe 0.00
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.