1

I'm using stress-ng and not able to reach 100% cpu load. stress-ng, version 0.09.60 on kernel 4.1.35 a quad core ARM processor. I've used the following commands:

stress-ng --matrix 4 --tz --ignite-cpu

I noticed that the cpu climbs up in 25% increments to 75% when I use the following:

  • stress-ng --matrix 1 --tz --ignite-cpu → 25% cpu load
  • stress-ng --matrix 2 --tz --ignite-cpu → 50% cpu load
  • stress-ng --matrix 3 --tz --ignite-cpu → 75% cpu load

Any higher matrix number of workers does not increase the load, for example

  • stress-ng --matrix 10 --tz --ignite-cpu → 75% cpu load

I've also tried as referenced
stress-ng -c 4 -l 100 or stress-ng -c 0 -l 100 and it still doesn't go above 75%. In fact those --cpu-load options don't keep cpu up as consistently as --matrix option.

tgogos
  • 23,218
  • 20
  • 96
  • 128
GigaWatts
  • 101
  • 8
  • The above [referenced](https://serverfault.com/questions/796225/stress-ng-simulate-specific-cpu-percentages) article is correct, and `stress-ng -c 0 -l 95` will balance all cores to make system CPU 95%. Problem on my setup was a bootloader script that had stress-ng only running on 3 out of 4 cores. – GigaWatts Apr 23 '21 at 21:35

1 Answers1

1

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.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
  • I was able to drive up CPU demand to 20% using `watch -n 2 dd if=/dev/zero bs=1M count=1024 | md5sum ` Though that doesn't not solve my problem of driving CPU above 75% utilization, CPU stays at 75% when using `stress-ng --matrix -4 --tz --ignite-cpu` and `watch -n 2 dd if=/dev/zero bs=1M count=1024 | md5sum ` together. – GigaWatts Apr 12 '21 at 18:57
  • 1
    You can customize the "bs=1G, 2G, etc" and "count= any number you want". – Hien Nguyen Apr 14 '21 at 13:46
  • Problem in my case was that the system was only using 3 of the 4 cores. I was able to reach 100% CPU when enabling the system to run on all 4 cores. – GigaWatts Dec 27 '22 at 06:30