spielwiese. (Posts about memory.)https://spielwiese.fontein.de/tag/memory.atom2019-11-17T10:46:48ZfelixNikolahow does ulimit work?https://spielwiese.fontein.de/2011/03/20/how-does-ulimit-work/2011-03-20T15:35:51+01:002011-03-20T15:35:51+01:00felix<p>does anyone knows how the <a href="http://ss64.com/bash/ulimit.html"><code>ulimit</code></a> bash (or whatever shell you like) command works? i’m currently running a few instances of the same program on a big server, and it happened yesterday twice that the programs together ate up all available memory (some of the instances using much more than others). there was a hard <code>ulimit</code> set on memory, and the result was that <i>all</i> these processed were killed. not just the one violating the memory limit in that moment.<br>
this sucks pretty much, since this destroyed some cpu days of work. does anyone knows why <code>ulimit</code> is doing this? i assume that the rationale is to stop <a href="https://en.wikipedia.org/wiki/Fork_bomb">fork bombs</a>, but in this case this is really, <i>really</i> annoying. killing one of the processes would have been perfectly enough…<br>
so, if anyone has good documentation on how <code>ulimit</code> works, whether it is possible to change this behaviour, and whether this is actually intended or a bug, i would like to hear about it…</p>