title: Docker memory limits not respected by mongo
body: <p>I am experiencing issue where mongodb does not respect imposed container memory limits and spills over into swap and slows to a crawl - the issue seems to be that mongo thinks all host memory is available to it. See <a href="https://github.com/dockerfile/mongodb/issues/34" rel="noreferrer">https://github.com/dockerfile/mongodb/issues/34</a></p>
  
  <p>My question is then - how does docker implement memory limits? I don't really have a big picture understanding of what the available options are for restricting resource access like this in unix - would someone be able to give a quick overview? </p>
  
  <p>Thanks</p>