Reputation: 366
I want to use stress-ng to stress Memory. I use this command
stress-ng --vm 1 --vm-bytes 1024M
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
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