Should Overlay redirect_dir (and metacopy) still be disabled?
Description
During evaluation of Flatcar (vs our current deployment platforms of Ubuntu 24 and TrueNAS Scale, both on ZFS) I noticed that Docker Overlay2 was not enabling native overlay diff, which has performance implications per Docker. The following warning is logged:
Not using native diff for overlay2, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled
Looking back it seems this was a decision made in 2020 per a presentation via #170. I'm not sure if "things have changed" or if Docker's guidance is wrong, but currently both Ubuntu 24 and TrueNAS Scale (Debian 12) have redirect_dir=off and metacopy=off.
I'm currently testing with the Flatcar Beta images where I've changed this via Butane:
kernel_arguments:
should_exist:
- overlay.redirect_dir=off
- overlay.metacopy=off
Which seems to be working per docker info and running without issue:
Storage Driver: overlay2
Backing Filesystem: zfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
So perhaps it should be re-evaluated?
Impact
May cause degraded performance and differs from other popular distributions.
Environment and steps to reproduce
Just run docker info to verify.
Expected behavior
Potentially move back to redirect_dir=off and metacopy=off
Additional information
Really loving the platform so far. 👍
Makes sense to disable it then as it just sets the default. In the case where we rely on redirect_dir in Flatcar, it's set explicitly. I wonder why Docker/runc doesn't explicitly disable this setting when they know it doesn't work for them in their mounts…
There is some discussion of that starting with this post on the related Docker PR - https://github.com/moby/moby/pull/34342#issuecomment-319664613
Can't say I know the "right" answer for Flatcar, but was just trying to stick with the recipe we currently have (in Ubuntu) while migrating, as it's performed well.