I want to test the systems reaction to a process that wants to consume more memory than there is available.
I run stress-ng with the following command (on a 6G RAM machine):
stress-ng --vm-bytes 8G --vm-keep -m 1 --aggressive
but I get this error:
stress-ng: error: [5035] stress-ng-vm: gave up trying to mmap, no available memory
Is it possible to force the program to ignore its own secure mechanism ?
Asked
Active
Viewed 1,749 times
0

tgogos
- 23,218
- 20
- 96
- 128

Meeresgott
- 431
- 3
- 17
1 Answers
0
try to add this parameter --vm 4
I was having the same problem and it is gone after that.

VeganEye
- 66
- 7
-
if it still fails, try this: https://unix.stackexchange.com/a/580467/235896 `sudo sysctl vm.overcommit_memory=0` (but here it was already 0 and would not make a difference) – VeganEye Jul 09 '20 at 05:43
-
1@JeremyCaney well, actually as I couldn't verify that the link content work on my machine, I think it is better for it to be just a comment :) – VeganEye Jul 09 '20 at 05:43