title: Docker warning on cgroup swap limit, memory.use_hierarchy
body: <p>I am getting this warning from 'sudo docker -d':</p>
  
  <blockquote>
    <p>WARNING: Your kernel does not support cgroup swap limit.</p>
  </blockquote>
  
  <p>even after following the steps (as in this <a href="https://docs.docker.com/installation/ubuntulinux/" rel="noreferrer">link</a>):</p>
  
  <ul>
  <li><p>modify below lines in /etc/default/grub (I did both for good measure)</p>
  
  <blockquote>
    <p>RUB_CMDLINE_LINUX_DEFUALT="cgroup_enable=memory swapaccount=1"
    GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"</p>
  </blockquote></li>
  <li><p>and then update-grub/reboot via</p>
  
  <blockquote>
    <p>sudo update-grub; sudo reboot</p>
  </blockquote></li>
  </ul>
  
  <p><strong>My questions are:</strong></p>
  
  <p><strong>1) Should I be worried about this warning?</strong> </p>
  
  <p>I think I should be because I am trying to use docker containers in a use case where enforcing memory limits is important.</p>
  
  <p><strong>2) Is it a good idea to change the memory use_hierarchy setting? -- or -- What is the best way to fix this?</strong> </p>
  
  <p>I see this warning in 'dmesg'. I am not sure if it is a good idea to try to change the use_hierarchy setting to '1' (nor how exactly to do this)</p>
  
  <blockquote>
    <p>cgroup: "memory" requires setting use_hierarchy to 1 on the root."</p>
  </blockquote>
  
  <p>Or, is there some better way to fix this? I'm just firing wild shots here, perhaps a kernel upgrade would help? I see some 3.16 kernel upgrades are possible.</p>
  
  <p><strong>Environment:</strong>
  I am running Ubuntu 14.04 x64 (kernel: 3.13.0-43-generic x86_64) with docker version 1.0.1</p>
  
  <p><strong>Other notes:</strong>
  I have read other online help articles about similar docker/cgroup errors that say installing apparmor_parser fixes it. However, on my system, apparmor is installed and appears to be started up just fine (per dmesg). Also, this file exists: /sbin/apparmor_parser</p>
  
  <p>Also, I'm rather new to admin tasks on linux servers.</p>