1

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 
tgogos
  • 23,218
  • 20
  • 96
  • 128
Milan
  • 1,447
  • 5
  • 19
  • 27
  • What does the documentation show? – S3DEV Feb 19 '22 at 15:23
  • @s3DEV, I have gone through the documents that suggest this command, stress-ng --brk 2 --stack 2 --bigheap 2 for memory pressure but to what percentage of memory bandwidth it stresses out the memory? – Milan Feb 19 '22 at 15:33
  • Stressing memory is part of development process. Even through it is a command question, exactly like IDE, compilers and other similar questions are on-topic for SO, I think this question can also be considered on-topic. I vote to re-open. – Adrian Maire Feb 21 '22 at 12:49

1 Answers1

1

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.

Colin Ian King
  • 521
  • 3
  • 6
  • Thanks Colin for your reply, Just wondering what is default rate , I mean without using memrate option when one stress the memory ? – Milan Feb 22 '22 at 18:43
  • from [the manual](https://man.uex.se/1/stress-ng) section `−−memrate N`: ... This memory stressor allows one to also specify the maximum read and write rates. The stressors will run at maximum speed if no read or write rates are specified. – Wolfson Nov 18 '22 at 08:04