iorih0304
iorih0304

Reputation: 366

Strees-ng: stress memory and don't want to let cpu loading go 100%

I want to use stress-ng to stress Memory. I use this command

stress-ng --vm 1 --vm-bytes 1024M

But I got the cpu load 100% enter image description here

How can I stress Memory and let the CPU load not be so high, or the CPU is necessary for Memory stress?

I also use the command, but the cpu loading is also 100% .

 stress-ng -c 1 -l 10 --vm 1 --vm-bytes 1024M

Upvotes: 2

Views: 2893

Answers (1)

Colin Ian King
Colin Ian King

Reputation: 581

When vm stressor is fully exercising memory the CPU performing the memory read/writes is either performing a read/write or stalled while waiting the read/write to complete (as memory activity outside of the cache takes significantly longer than a CPU clock cycle). The specific CPU thread is 'busy' and hence the kernel scheduler marks it as busy.

With no other limitations (e.g. other processes running), the vm stressor will consume as much scheduling time allowed, and hence that's what you are seeing.

Upvotes: 4

Related Questions