title: How to enable Google Container Optimized OS swap limit support
body: <p>I'm running Kubernetes/Docker on Google Container Optimized OS on a GCE instance. When I run <code>docker info</code> it says</p>
  
  <pre><code>$ docker info
  Containers: 116
   Running: 97
   Paused: 0
   Stopped: 19
  Images: 8
  Server Version: 1.11.2
  Storage Driver: overlay
   Backing Filesystem: extfs
  Logging Driver: json-file
  Cgroup Driver: cgroupfs
  Plugins: 
   Volume: local
   Network: null host bridge
  Kernel Version: 4.4.21+
  Operating System: Container-Optimized OS from Google
  OSType: linux
  Architecture: x86_64
  CPUs: 4
  Total Memory: 14.67 GiB
  Name: REDACTED
  ID: REDACTED
  Docker Root Dir: /var/lib/docker
  Debug mode (client): false
  Debug mode (server): false
  Registry: https://index.docker.io/v1/
  WARNING: No swap limit support
  </code></pre>
  
  <p>The last line says that there is no swap limit support. I'm having trouble figuring out how to enable swap limit support. I found instructions for Ubuntu/Debian <a href="https://docs.docker.com/install/linux/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities" rel="nofollow noreferrer">here</a>.</p>
  
  <p>My problem is that my docker containers get OOMKilled as soon as they reach their memory limit instead of trying swapping. I want the containers to use swap as a buffer instead of dying immediately.</p>