New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphdriver: promote overlay2 over aufs #34430

Merged
merged 1 commit into from Aug 9, 2017

Conversation

Projects
None yet
8 participants
@AkihiroSuda
Member

AkihiroSuda commented Aug 8, 2017

Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp

- What I did
Promote overlay2 over aufs, as overlay2 recently became matured, although it is not perfect.

- How I did it
By updating daemon/graphdriver/driver_linux.go

- How to verify it

Make sure overlay2 is preferred over aufs by default

- Description for the changelog

promote overlay2 over aufs

- A picture of a cute animal (not mandatory but encouraged)
penguins

TODO: update https://github.com/docker/docker.github.io/blob/b12ec60faa9612f2b37e09e34faf882e8c3efad7/engine/userguide/storagedriver/selectadriver.md

@AkihiroSuda

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Aug 8, 2017

Member

I think the reason aufs was still above overlay(2) was that aufs is an optional kernel module; on a clean install of, e.g. Ubuntu 16.04, overlay2 will be the default driver. Only if someone explicitly installs the aufs kernel module, aufs will be used instead of overlay

We should change the install script at get.docker.com to only install that module on older kernels (i.e., kernel 3.13 and ubuntu 14.04)

Member

thaJeztah commented Aug 8, 2017

I think the reason aufs was still above overlay(2) was that aufs is an optional kernel module; on a clean install of, e.g. Ubuntu 16.04, overlay2 will be the default driver. Only if someone explicitly installs the aufs kernel module, aufs will be used instead of overlay

We should change the install script at get.docker.com to only install that module on older kernels (i.e., kernel 3.13 and ubuntu 14.04)

@justincormack

This comment has been minimized.

Show comment
Hide comment
@justincormack

justincormack Aug 8, 2017

Contributor

@thaJeztah people may have that module installed for other reasons, it provides many other modules other than aufs. So I agree with this change, we should prefer the consistent choice of overlay2 where available.

Contributor

justincormack commented Aug 8, 2017

@thaJeztah people may have that module installed for other reasons, it provides many other modules other than aufs. So I agree with this change, we should prefer the consistent choice of overlay2 where available.

@justincormack

This comment has been minimized.

Show comment
Hide comment
@justincormack

justincormack Aug 8, 2017

Contributor

@AkihiroSuda I think I would put aufs above the legacy overlay though

Contributor

justincormack commented Aug 8, 2017

@AkihiroSuda I think I would put aufs above the legacy overlay though

graphdriver: promote overlay2 over aufs
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
@AkihiroSuda

This comment has been minimized.

Show comment
Hide comment
@AkihiroSuda
Member

AkihiroSuda commented Aug 8, 2017

updated @justincormack

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Aug 8, 2017

Member

I'm definitely +1 -- in my own experience, AUFS has stayed pretty consistent, but overlay2 has been improving (so much that I can't remember the last time I ran into one of the edge cases).

Member

tianon commented Aug 8, 2017

I'm definitely +1 -- in my own experience, AUFS has stayed pretty consistent, but overlay2 has been improving (so much that I can't remember the last time I ran into one of the edge cases).

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Aug 8, 2017

Member

I'm +1 to promoting it, just had my initial concerns over the change in behaviour. Existing installs should not be affected though, because it will detect the existing aufs directory, so stick with that driver; it will only switch to overlay if someone nukes /var/lib/docker, which should be ok

Member

thaJeztah commented Aug 8, 2017

I'm +1 to promoting it, just had my initial concerns over the change in behaviour. Existing installs should not be affected though, because it will detect the existing aufs directory, so stick with that driver; it will only switch to overlay if someone nukes /var/lib/docker, which should be ok

@dmcgowan

This comment has been minimized.

Show comment
Hide comment
@dmcgowan

dmcgowan Aug 8, 2017

Member

we should prefer the consistent choice of overlay2 where available

agreed

+1

Member

dmcgowan commented Aug 8, 2017

we should prefer the consistent choice of overlay2 where available

agreed

+1

@thaJeztah

looks like we're in agreement

LGTM

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Aug 9, 2017

Member

ping @mstanleyjones for checking if the docs need to be updated

Member

thaJeztah commented Aug 9, 2017

ping @mstanleyjones for checking if the docs need to be updated

@mistyhacks

This comment has been minimized.

Show comment
Hide comment
@mistyhacks

mistyhacks Aug 9, 2017

Contributor

@thaJeztah they will, when this lands somewhere. Can you file a docs PR with the relevant version details?

Contributor

mistyhacks commented Aug 9, 2017

@thaJeztah they will, when this lands somewhere. Can you file a docs PR with the relevant version details?

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Aug 9, 2017

Member

@mstanleyjones opened docker/docker.github.io#4141

Member

thaJeztah commented Aug 9, 2017

@mstanleyjones opened docker/docker.github.io#4141

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Aug 9, 2017

Member

All green - there we go!

Member

thaJeztah commented Aug 9, 2017

All green - there we go!

@thaJeztah thaJeztah merged commit 2e38c07 into moby:master Aug 9, 2017

6 checks passed

dco-signed All commits are signed
experimental Jenkins build Docker-PRs-experimental 36156 has succeeded
Details
janky Jenkins build Docker-PRs 44775 has succeeded
Details
powerpc Jenkins build Docker-PRs-powerpc 5161 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 16171 has succeeded
Details
z Jenkins build Docker-PRs-s390x 4975 has succeeded
Details
@Silex

This comment has been minimized.

Show comment
Hide comment
@Silex

Silex Sep 28, 2017

I just upgraded to 17.09 and I see that overlay2 is the new default. My install still seems to use aufs:

Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 504
 Dirperm1 Supported: true

Should I switch to overlay2? what are the pros/cons?

Silex commented Sep 28, 2017

I just upgraded to 17.09 and I see that overlay2 is the new default. My install still seems to use aufs:

Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 504
 Dirperm1 Supported: true

Should I switch to overlay2? what are the pros/cons?

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Sep 28, 2017

Member

@Silex for existing installations, the storage driver that was already in use is kept. Aufs overall is a good choice, and if it works for you, there's no need to switch.

Promoting overlay2 is done because;

  • it's supported by default in the mainline kernel (no additional kernel modules are needed)
  • on some distros/kernels, aufs is no longer available, which could result in users upgrading their kernel, and no longer being able to get access to their containers/images
  • (because of the first above); it's supported by (almost) all distributions/platforms that Docker runs on, thus less differences between distributions/platforms
  • overlay2 is performant, does not require manual setup/configuration, and has relatively few issues

Downsides of overlay/overlay2: it's not (yet?) fully POSIX compliant (see Limitations on OverlayFS compatibility). There are some corner-cases where this can cause issues; many of them have been resolved though.

Because of the above, we decided picking overlay2 as a default was a good choice. Keep in mind that it's a default - some use cases may be better addressed with a specific storage driver; that's not a decision that can be made automatically, and something that the user can configure (see Select a storage driver)

Member

thaJeztah commented Sep 28, 2017

@Silex for existing installations, the storage driver that was already in use is kept. Aufs overall is a good choice, and if it works for you, there's no need to switch.

Promoting overlay2 is done because;

  • it's supported by default in the mainline kernel (no additional kernel modules are needed)
  • on some distros/kernels, aufs is no longer available, which could result in users upgrading their kernel, and no longer being able to get access to their containers/images
  • (because of the first above); it's supported by (almost) all distributions/platforms that Docker runs on, thus less differences between distributions/platforms
  • overlay2 is performant, does not require manual setup/configuration, and has relatively few issues

Downsides of overlay/overlay2: it's not (yet?) fully POSIX compliant (see Limitations on OverlayFS compatibility). There are some corner-cases where this can cause issues; many of them have been resolved though.

Because of the above, we decided picking overlay2 as a default was a good choice. Keep in mind that it's a default - some use cases may be better addressed with a specific storage driver; that's not a decision that can be made automatically, and something that the user can configure (see Select a storage driver)

@Silex

This comment has been minimized.

Show comment
Hide comment
@Silex

Silex Sep 28, 2017

@thaJeztah: Thank you for the detailed explanation! 👍

Silex commented Sep 28, 2017

@thaJeztah: Thank you for the detailed explanation! 👍

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