Skip to content

Instantly share code, notes, and snippets.

@lukassup
Created June 30, 2017 21:47
Show Gist options
  • Select an option

  • Save lukassup/8e4d19a25103770e1a7de91febbc4b79 to your computer and use it in GitHub Desktop.

Select an option

Save lukassup/8e4d19a25103770e1a7de91febbc4b79 to your computer and use it in GitHub Desktop.
  • If aufs is available, default to it, because it is the oldest storage driver. However, it is not universally available.

  • If possible, the storage driver with the least amount of configuration is used, such as btrfs or zfs. Each of these relies on the backing filesystem being configured correctly.

  • Otherwise, try to use the storage driver with the best overall performance and stability in the most usual scenarios.

    • overlay2 is preferred, followed by overlay. Neither of these requires extra configuration.
    • devicemapper is next, but requires direct-lvm for production environments, because loopback-lvm, while zero-configuration, has very poor performance.
  • aufs, overlay, and overlay2 all operate at the file level rather than the block level. This uses memory more efficiently, but the container’s writable layer may grow quite large in write-heavy workloads.

  • Block-level storage drivers such as devicemapper, btrfs, and zfs perform better for write-heavy workloads (though not as well as Docker volumes).

  • For lots of small writes or containers with many layers or deep filesystems, overlay may perform better than overlay2.

  • btrfs and zfs require a lot of memory.

  • zfs is a good choice for high-density workloads such as PaaS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment