sysbench-实践-04-内存测试
目录
sysbench–实践–04–内存测试
sysbench–实践–04–内存测试
1、介绍
测试内存连续读写性能
2、参数说明
sysbench --test=memory help
2.1、–memory-block-size=SIZE
- 测试时内存块大小
- 默认值:1K。
2.2、–memory-total-size=SIZE
- 传输数据可使用的最大内存大小
- 默认值:100G。
2.3、–memory-scope=STRING
- 内存访问范围:global/local
- 默认值:global。
2.4、–memory-hugetlb=[on|off
- 从HugeTLB池分配内存
- 默认值:off。
2.5、–memory-oper=STRING
- 内存操作类型:
- read
- write
- none
- 默认值:write。
2.6、–memory-access-mode=STRING
- 内存访问方式:
- seq(顺序)
- rnd(随机)
- 默认值:seq。
3、操作
内存测试, 测试的内存块大小为8k,测试的数据量是1G
[root@zhoufei test]# sysbench memory --memory-block-size=8k --memory-total-size=1G run
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
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: 1024MiB
operation: write
scope: global
Initializing worker threads...
Threads started!
Total operations: 131072 (757986.53 per second)
1024.00 MiB transferred (5921.77 MiB/sec)
General statistics:
total time: 0.1696s
total number of events: 131072
Latency (ms):
min: 0.00
avg: 0.00
max: 0.40
95th percentile: 0.00
sum: 135.76
Threads fairness:
events (avg/stddev): 131072.0000/0.00
execution time (avg/stddev): 0.1358/0.00