<p>My project might be an overcommitted system, and I have to improve the reliability by specifying an appropriate container mem limit, by which the total mem of the node should not be divided. But I'm confused with the following statements in the Kubernetes v1.1 doc <a href="http://kubernetes.io/v1.1/docs/proposals/resource-qos.html" rel="nofollow noreferrer">Resource of Qos</a>:</p>
<blockquote>
<h2>Incompressible Resource Guarantees</h2>
<ul>
<li><p>if they exceed their memory request, they could be killed (if some other container needs memory)</p>
</li>
<li><p>Containers will be killed if they use more memory than their limit.</p>
</li>
</ul>
</blockquote>
<p>and the command <code>docker stats</code> shows a &quot;LIMIT&quot; for each container:</p>
<p><a href="https://i.stack.imgur.com/XNS4G.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XNS4G.jpg" alt="enter image description here" /></a></p>
<p>I think it means that containers will not use mems more than the &quot;LIMIT&quot; since I've met sometimes the <code>MEM%</code> stays at <code>100%</code> for a while, so how and when the containers are killed?</p>
<h2>Update</h2>
<p>I think OOM Killer is enabled with the default value <code>0</code>.</p>
<pre><code>&gt; cat /proc/sys/vm/oom_kill_allocating_task
0
</code></pre>

Yang
<p>Cgroup memory limit feature is used, so I recommend to read cgroup doc:</p>

<blockquote>
  <p>Tasks that attempt to consume more memory than they are allowed are
  immediately killed by the OOM killer.</p>
</blockquote>

<p><a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html" rel="nofollow">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-memory.html</a></p>
