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.67k stars 277 forks source link

Question regarding to the level percentage stressor #419

Open wangyihanlarry opened 2 weeks ago

wangyihanlarry commented 2 weeks ago

Hi Colin,

I have a question regarding to the stress-ng cpu and memory stressor, does the following commands stress the system upto the certain level? I meaning also take account the current workload of the system, if the cpu consume 3% for now, then we only consume 2% to reach the 5% busy?

stress-ng --timeout 10800 --verbose --metrics-brief --cpu 0 -l 5 stress-ng --timeout 10800 --verbose --metrics-brief --vm 1 --vm-bytes 25% --vm-method all --verify

ColinIanKing commented 2 weeks ago

The cpu stressor consumes the specified amount of compute in terms of it's own cpu consumption. So if the CPU is already loaded by X % and the cpu stressor is specified to use Y % then the actual CPU being consumed is (X + Y)%

wangyihanlarry commented 1 week ago

got u, one more question, seems the stress the memory upto 50% did not work image

wangyihanlarry commented 1 week ago

any update on the memory relate question @ColinIanKing

ColinIanKing commented 6 days ago

There was an issue in another bug report that was similar to this and I fixed it with the following commits:

commit 3f6556fecb4386ee0eaecc8e187c659c15ae2039
Author: Colin Ian King <colin.i.king@gmail.com>
Date:   Fri Sep 6 15:43:41 2024 +0100

    stress-*: fix vm memory % size parameter handling

and

commit 8cc021b51b2e6ff3d7c7c670c7c42aa4e58dfe87
Author: Colin Ian King <colin.i.king@gmail.com>
Date:   Fri Sep 6 16:35:16 2024 +0100

    stress-vm: remove debugging setting if in statement

can you try building stress-ng from the repository with the latest source code and see if this fixes the issue you are seeing.

ColinIanKing commented 1 day ago

Any update on trying the latest source?