2015-01-16 17:54 GMT+08:00 Bernhard Voelker <mail@bernhard-voelker.de>:
On 01/16/2015 09:11 AM, Andrea Turrini wrote:
The problem of ulimit is that it limits the virtual memory, not the resident one, and the variability of the ratio virtual/resident memory makes it difficult to find the right value to use with "ulimit -v" so to have the resident memory limited to 8Gb.
Then maybe "prlimit --rss=..." of the util-linux package is your friend. ;-)
I didn't know this command; as an experiment, I tried "prlimit --rss=500 <tool>" but the RSS value in "top" reached 1Gb before I killed the process. Since the page size is 4K, it seems prlimit fails to force the value for RSS. OK, it is written that prlimit tries to modify the value, so I can not expect it succeeds each time... Moreover, I want to limit the overall memory used by the tool, not just the resident (that is why i needed the memsw part of the cgroups). Best, Andrea -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org