linux - 压力-ng 未达到 100% CPU 负载
问题描述
我正在使用 stress-ng,但无法达到 100% 的 CPU 负载。 stress-ng, version 0.09.60
在内核上4.1.35
是一个四核 ARM 处理器。我使用了以下命令:
stress-ng --matrix 4 --tz --ignite-cpu
我注意到当我使用以下命令时,cpu 以 25% 的增量上升到 75%:
stress-ng --matrix 1 --tz --ignite-cpu
→ 25% CPU 负载stress-ng --matrix 2 --tz --ignite-cpu
→ 50% CPU 负载stress-ng --matrix 3 --tz --ignite-cpu
→ 75% CPU 负载
例如,任何更高的工作人员矩阵数量都不会增加负载
stress-ng --matrix 10 --tz --ignite-cpu
→ 75% CPU 负载
我也尝试过参考
stress-ng -c 4 -l 100
或 stress-ng -c 0 -l 100
它仍然没有超过 75%。事实上,这些--cpu-load
选项并没有像选项一样保持 cpu 的持续运行--matrix
。
解决方案
I wonder if you want to use dd
to increase CPU benchmark. I usually use it to test CPU usage alarm.
dd if=/dev/zero of=/storage/test bs=1M count=1024 | md5sum
ref: How to use 'dd' to benchmark your disk or CPU?
Perhaps not many people use this, but 'dd' in conjunction with any stream-processing CPU-intensive program can also be used as a simple CPU benchmark! It may be not very accurate, but the huge advantage is that it doesn't require installing any additional software whatsoever, and typically you can run this “out of the box” on any GNU/Linux system.
推荐阅读
- python - Python 异步 Azure Blob 上传
- r - 如何扩大y轴刻度
- python - 使用较大样本的 NumPy 随机抽样比较小样本产生的唯一元素更少
- angular - 如何设置自定义离子选择和离子选择选项的数字输入限制
- aws-glue - AWS Glue 2.0,本地pyspark开发,测试混乱
- google-cloud-platform - 如何从 Apache Beam(谷歌云数据流)中的列字符串中删除特殊字符,包括逗号、引号
- tensorflow - 动态 RNN 在 Eager 模式下工作于模棱两可的形状张量,但不适用于图形模式
- actions-on-google - 意图中的 Google Action 自定义名称
- numpy - numpy - 为什么均值和 SD 对于相同的值不稳定?
- flutter - 允许在新的集成测试中运行整个测试文件夹——就像普通的单元测试一样