Stress-ng 的简单学习

stress,ng,简单,学习 · 浏览次数 : 263

小编点评

排版内容时需要带简单的排版,以便生成内容时可以顺利排版。排版时可以带简单的排版,以便生成内容时可以顺利排版。排版时可以带简单的排版,以便生成内容时可以顺利排版。

正文

背景

想研究一下国产和不同架构,不通型号CPU的算力
也作为后续生产交付的基线准备.
学习各种不同工具进行简要测试.

安装

git clone https://github.com/ColinIanKing/stress-ng.git
cd stress-ng
make
然后就会在当前目录创建一个可执行文件
stress-ng
x86和aarch64是一样的. 

主要测试脚本

Run 4 CPU, 2 virtual memory, 1 disk and 8 fork stressors for 2 minutes and print measurements:
stress-ng --cpu 4 --vm 2 --hdd 1 --fork 8 --timeout 2m --metrics

Run matrix stressor on all online CPUs for 60 seconds and measure temperature:
stress-ng --matrix -1 --tz -t 60

Run a mix of 4 I/O stressors and check for changes in disk S.M.A.R.T. metadata:
sudo stress-ng --iomix 4 --smart -t 30s

Benchmark system calls using the VDSO:
stress-ng --vdso 1 -t 5 --metrics

Generate and measure branch misses using perf metrics:
sudo stress-ng --branch 1 --perf -t 10 --stdout | grep Branch

鲲鹏虚拟机的结果

/stress-ng --cpu 4 --vm 2 --hdd 1 --fork 8 --timeout 2m --metrics
stress-ng: info:  [1764043] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [1764043] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [1764043] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: info:  [1764043]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: info:  [1764043] cpu               90568    120.01    476.10      0.25       754.67         190.13        99.23          5376
stress-ng: info:  [1764043] vm              4479814    120.00    237.18      1.09     37331.39       18801.41        99.28        150656
stress-ng: info:  [1764043] hdd              458752    125.92     15.30      6.96      3643.14       20609.34        17.68          1600
stress-ng: info:  [1764043] fork             805043    120.00     88.03     90.05      6708.66        4520.63        18.55          3904
stress-ng: info:  [1764043] miscellaneous metrics:
stress-ng: info:  [1764043] hdd                 5378.02 MB/sec read rate (geometic mean of 1 instances)
stress-ng: info:  [1764043] hdd                 5385.10 MB/sec write rate (geometic mean of 1 instances)
stress-ng: info:  [1764043] hdd                 5381.56 MB/sec read/write combined rate (geometic mean of 1 instances)
stress-ng: info:  [1764043] successful run completed in 125.92s (2 mins, 5.92 secs)

飞腾2500+物理机

stress-ng: info:  [4155956] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [4155956] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [4155956] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: info:  [4155956]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: info:  [4155956] cpu               54036    120.08    480.27      0.04       449.99         112.50       100.00          6336
stress-ng: info:  [4155956] vm              2327541    120.00    238.08      1.92     19395.68        9698.38        99.99        151104
stress-ng: info:  [4155956] hdd             1706914    120.00     80.84     37.43     14223.72       14432.65        98.55          3776
stress-ng: info:  [4155956] fork             799938    120.00    494.91    581.67      6666.13         743.03       112.14          4032
stress-ng: info:  [4155956] miscellaneous metrics:
stress-ng: info:  [4155956] hdd                 2663.89 MB/sec read rate (geometic mean of 1 instances)
stress-ng: info:  [4155956] hdd                 3252.81 MB/sec write rate (geometic mean of 1 instances)
stress-ng: info:  [4155956] hdd                 2929.55 MB/sec read/write combined rate (geometic mean of 1 instances)
stress-ng: info:  [4155956] successful run completed in 120.17s (2 mins, 0.17 secs)

飞腾2000+物理机

stress-ng: info:  [3916081] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [3916081] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [3916081] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: info:  [3916081]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: info:  [3916081] cpu               52085    120.10    479.29      0.11       433.70         108.65        99.80          6336
stress-ng: info:  [3916081] vm              1881017    120.00    237.33      1.89     15674.69        7863.20        99.67        150912
stress-ng: info:  [3916081] hdd             1614848    120.01     73.40     46.24     13455.87       13497.90        99.69          3776
stress-ng: info:  [3916081] fork            1314325    120.00    522.63    579.41     10952.70        1192.63       114.80          4032
stress-ng: info:  [3916081] miscellaneous metrics:
stress-ng: info:  [3916081] hdd                 2012.78 MB/sec read rate (geometic mean of 1 instances)
stress-ng: info:  [3916081] hdd                 2487.28 MB/sec write rate (geometic mean of 1 instances)
stress-ng: info:  [3916081] hdd                 2226.36 MB/sec read/write combined rate (geometic mean of 1 instances)
stress-ng: info:  [3916081] successful run completed in 120.20s (2 mins, 0.20 secs)

飞腾2500 虚拟机

stress-ng: info:  [814485] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [814485] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [814485] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: info:  [814485]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: info:  [814485] cpu               39040    120.05    354.04      0.61       325.19         110.08        73.85          4736
stress-ng: info:  [814485] vm              1612136    120.00    180.96      1.82     13434.14        8820.19        76.16        146880
stress-ng: info:  [814485] hdd             1189177    120.02     57.64     28.67      9907.93       13777.31        71.91          1664
stress-ng: info:  [814485] fork             310675    120.00    100.49    111.94      2588.94        1462.49        22.13          3904
stress-ng: info:  [814485] miscellaneous metrics:
stress-ng: info:  [814485] hdd                 1788.38 MB/sec read rate (geometic mean of 1 instances)
stress-ng: info:  [814485] hdd                 2009.70 MB/sec write rate (geometic mean of 1 instances)
stress-ng: info:  [814485] hdd                 1893.48 MB/sec read/write combined rate (geometic mean of 1 instances)
stress-ng: info:  [814485] successful run completed in 120.14s (2 mins, 0.14 secs)

海光7285

stress-ng: info:  [2005838] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [2005838] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [2005838] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: info:  [2005838]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: info:  [2005838] cpu              370238    120.00    479.22      0.00      3085.25         772.58        99.84          6008
stress-ng: info:  [2005838] vm              5513614    120.00    237.47      2.11     45946.46       23013.67        99.82        149276
stress-ng: info:  [2005838] hdd             2173494    120.05     86.50     32.82     18105.25       18215.65        99.39          2168
stress-ng: info:  [2005838] fork            1593832    120.00    524.99    444.59     13281.92        1643.83       101.00          4332
stress-ng: info:  [2005838] miscellaneous metrics:
stress-ng: info:  [2005838] hdd                 9165.57 MB/sec read rate (geometic mean of 1 instances)
stress-ng: info:  [2005838] hdd                 3352.49 MB/sec write rate (geometic mean of 1 instances)
stress-ng: info:  [2005838] hdd                 4897.99 MB/sec read/write combined rate (geometic mean of 1 instances)
stress-ng: info:  [2005838] successful run completed in 120.10s (2 mins, 0.10 secs)

Golden 6150

stress-ng: info:  [76329] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [76329] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [76329] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: info:  [76329]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: info:  [76329] cpu              557584    120.00    479.66      0.34      4646.48        1161.64       100.00          3344
stress-ng: info:  [76329] vm              3156543    120.02    229.66     10.38     26299.99       13149.95       100.00        148164
stress-ng: info:  [76329] hdd             1828690    120.20     46.95     72.79     15213.18       15272.39        99.61           744
stress-ng: info:  [76329] fork             551818    120.00     51.47    910.99      4598.47         573.34       100.26           964
stress-ng: info:  [76329] miscellaneous metrics:
stress-ng: info:  [76329] hdd                 3928.41 MB/sec read rate (geometic mean of 1 instances)
stress-ng: info:  [76329] hdd                 1295.59 MB/sec write rate (geometic mean of 1 instances)
stress-ng: info:  [76329] hdd                 1945.16 MB/sec read/write combined rate (geometic mean of 1 instances)
stress-ng: info:  [76329] successful run completed in 120.21s (2 mins, 0.21 secs)

Silver 4216

stress-ng: info:  [5609] setting to a 120 second (2 mins, 0.00 secs) run per stressor
stress-ng: info:  [5609] dispatching hogs: 4 cpu, 2 vm, 1 hdd, 8 fork
stress-ng: info:  [5609] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: info:  [5609]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: info:  [5609] cpu              445180    120.00    479.96      0.01      3709.81         927.51        99.99          6092
stress-ng: info:  [5609] vm              2430504    120.01    237.08      2.92     20253.01       10126.97       100.00        149300
stress-ng: info:  [5609] hdd             1322664    120.90     42.32     44.13     10939.86       15300.42        71.50          2228
stress-ng: info:  [5609] fork            1788238    120.00    572.10    357.04     14901.97        1924.63        96.78          2240
stress-ng: info:  [5609] miscellaneous metrics:
stress-ng: info:  [5609] hdd                 6977.70 MB/sec read rate (geometic mean of 1 instances)
stress-ng: info:  [5609] hdd                 1507.84 MB/sec write rate (geometic mean of 1 instances)
stress-ng: info:  [5609] hdd                 2465.46 MB/sec read/write combined rate (geometic mean of 1 instances)
stress-ng: info:  [5609] successful run completed in 120.90s (2 mins, 0.90 secs)

与Stress-ng 的简单学习相似的内容:

Stress-ng 的简单学习

背景 想研究一下国产和不同架构,不通型号CPU的算力 也作为后续生产交付的基线准备. 学习各种不同工具进行简要测试. 安装 git clone https://github.com/ColinIanKing/stress-ng.git cd stress-ng make 然后就会在当前目录创建一个可

部分信创CPU算力与IntelCPU的简单比较

部分信创CPU算力与IntelCPU的简单比较 摘要 最近一直想查看一下国产和非国产的CPU的性能比较 从最开始学习研究 sysbench 到周五晚上开始学习 stress-ng 今天查看github上面stress-ng的官网时 发现有一个ubuntu的网页不错,感觉可以用来进行一些简单计算 我主

飞腾与鲲鹏性能差异的一些思考

飞腾与鲲鹏性能差异的一些思考 背景 自己在进行stress-ng以及sysbench的测试验证时发现: 飞腾的性能要比鲲鹏的性能有非常大的差距. 最近同事在现场也进行了压测, 也发现飞腾的性能不是特别好. 这里想简单总结一下自己学习过的资料,尝试分析一下为何差异这么大. 制程 注意 制程采用台积电发

stress-NG 磁盘测试结果-全国产信创部分验证

# stress-NG 磁盘测试结果 ## 摘要 ``` 前几天分别还是用了redis-benchmark还有specjvm2008进行了多种系统的压测 得出了信创CPU的一些简单结论 但是一直还没有压测磁盘, 今天想着使用stress-NG压测一下不同架构的信创服务器的磁盘清空. 在网卡还没到打瓶

[转帖]系统性能测试工具

https://cloud.tencent.com/developer/article/2129549 0x01 处理器性能测试 stress 命令 - 系统压力基础测试(拷机) 描述:Stress/Stress-NG是Linux下两个常用的系统级压力测试工具,stress命令简单易用stress-

是否开启超线程对CPU不同命令的影响情况

背景 最近公司购买了一台服务器, 要进行一次性能测试. 基于此, 我这边进行了一下超线程与否的测试验证 使用stress-ng的命令,对所有的 CPU 方法进行测试 然后只分析 bogo ops/s 进行简要分析 测试结果 for i in ackermann apery bitops callfu

[转帖]Linux使用Stress-ng测试CPU、内存、磁盘I/O满载情况教程与范例

https://www.xiaoyuanjiu.com/108301.html 介绍如何在 Linux 系统上使用 stress-ng 负载测试工具,产生 CPU、内存等资源满载的状况。 stress-ng stress-ng 与旧的 stress 都可以用来产生系统负载,但新的 stress-ng

Sysbench 开启超线程/关闭超线程以及容器运行数据库的性能损耗

Sysbench 开启超线程/关闭超线程性能损耗 摘要 Stress-NG 测试完之后 突然想 使用sysbenchen也进行一次压测 验证一把 超线程对数据的性能影响. 压测命令 ./sysbench \ --db-driver=pgsql \ --pgsql-host=10.24.2x.xx \

[转帖]stress-ng

https://wiki.ubuntu.com/Kernel/Reference/stress-ng Introduction stress-ng will stress test a computer system in various selectable ways. It was design

[转帖]Stress-ng 压力测试

https://www.jianshu.com/p/760954f96042 1、源码位置https://github.com/ColinIanKing/stress-ng2、参数和用法-c 2 : 生成2个worker循环调用sqrt()产生cpu压力-i 1 : 生成1个worker循环调用sy