Tuesday, March 15, 2022

[SOLVED] how to use stress-ng to stress memory

Issue

I need to stress memory to about 50% of system memory bandwidth capacity(say 3000MT/s is system memory bandwidth capacity).

is this the right command for it?

stress-ng -vm 2 --vm-bytes 10% -t 10 

Solution

You can exercise the memory bandwidth with the stress-ng memrate stressor, e.g.

stress-ng --memrate 1 --memrate-wr 2000 --memrate-rd 1000 -v

this will exercise memory writes at 2000 MB/s and reads at 1000 MB/s. Adjust the settings to match your requirement. This is available in newer versions of stress-ng, so you may need to build stress-ng from source.



Answered By - Colin Ian King
Answer Checked By - Robin (WPSolving Admin)