ColinIanKing / stress-ng

This is the stress-ng upstream project git repository. stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.
https://github.com/ColinIanKing/stress-ng
GNU General Public License v2.0
1.82k stars 290 forks source link

Behavior of prime-incdec in stress-vm #454

Closed tsukada-ascade closed 2 weeks ago

tsukada-ascade commented 2 weeks ago

Hi, thanks for this useful software and I have a question. Has the behavior of stress-vm's --vm-method prime-incdec changed between V0.13.11 and V0.13.12 or later?

In V0.13.11,

$ ./stress-ng -V
stress-ng, version 0.13.11 (gcc 11.4, x86_64 Linux 5.14.0-427.13.1.el9_4.x86_64) ??

$ ./stress-ng --vm 1 --vm-ops 2000 --vm-method prime-incdec --metrics
stress-ng: info:  [80094] defaulting to a 86400 second (1 day, 0.00 secs) run per stressor
stress-ng: info:  [80094] dispatching hogs: 1 vm
stress-ng: info:  [80094] successful run completed in 0.42s
stress-ng: info:  [80094] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per
stress-ng: info:  [80094]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)
stress-ng: info:  [80094] vm                 2000      0.41      0.25      0.15      4828.47        5000.00        96.57

In V0.18.06,

$ ./stress-ng -V
stress-ng, version 0.18.06 (gcc 11.4.1, x86_64 Linux 5.14.0-427.13.1.el9_4.x86_64) ??

$ ./stress-ng --vm 1 --vm-ops 2000 --vm-method prime-incdec --metrics
stress-ng: info:  [67665] defaulting to a 1 day run per stressor
stress-ng: info:  [67665] dispatching hogs: 1 vm

(...never end)

Then send Ctrl-C, bogo ops is zero.

^Cstress-ng: warn:  [67665] metrics-check: all bogo-op counters are zero, data may be incorrect
stress-ng: metrc: [67665] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: metrc: [67665]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: metrc: [67665] vm                    0     64.17     11.49     50.87         0.00           0.00        97.19        263352
stress-ng: info:  [67665] skipped: 0
stress-ng: info:  [67665] passed: 1: vm (1)
stress-ng: info:  [67665] failed: 0
stress-ng: info:  [67665] metrics untrustworthy: 0
stress-ng: info:  [67665] successful run completed in 1 min, 4.17 secs
ColinIanKing commented 2 weeks ago

Hi, thank you for finding and reporting this issue, it was due to early termination of the stressor method. Fix has been pushed to the repository.