How to use stress-ng to simulate memory usage

memorymemory usagestress-testingunix

I found the command stress-ng -c 0 -l 60 which takes up 60% of the CPU. Is there a similar command for taking a certain percentage of the total memory available?

Best Answer

If you're running a Linux flavour your distribution may include a numactl package and otherwise grab the source for the memhog utility included in there from github.