Skip to content

[release/2.1] Update erofs snapshotter to make immutable optional#12091

Merged
mxpv merged 1 commit intocontainerd:release/2.1from
erofs:erofs-release-2.1
Jul 13, 2025
Merged

[release/2.1] Update erofs snapshotter to make immutable optional#12091
mxpv merged 1 commit intocontainerd:release/2.1from
erofs:erofs-release-2.1

Conversation

@hsiangkao
Copy link
Copy Markdown
Member

backport #12072

To fix erofs snapshotter performance regression due to IMMUTABLE_FL.

Enabling the IMMUTABLE_FL file attribute causes dirty data to be
flushed synchronously at least on EXT4, which can greatly impact
container launch performance.  In contrast, the overlayfs snapshotter
does not use syncfs by default.

Most users may not need IMMUTABLE_FL, let's make IMMUTABLE_FL optional
to align with the behavior of the overlayfs snapshotter and recover the
original performance.

1. tensorflow

Test commands:
$ nerdctl image pull --snapshotter=X --unpack="false" tensorflow/tensorflow:2.19.0
$ time nerdctl container --snapshotter=X run -d tensorflow/tensorflow:2.19.0 /bin/sh

Results:
 overlayfs                 | 0m18.748s
 erofs (no IMMUTABLE_FL)   | 0m10.090s
 erofs (with IMMUTABLE_FL) | 0m21.074s

2. ubuntu 22.04

Test commands:
$ nerdctl image pull --snapshotter=X --unpack="false" ubuntu:22.04
$ time nerdctl container --snapshotter=X run -d ubuntu:22.04 /bin/sh

Results:
 overlayfs                 | 0m1.147s
 erofs (no IMMUTABLE_FL)   | 0m0.795s
 erofs (with IMMUTABLE_FL) | 0m1.094s

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
@github-project-automation github-project-automation bot moved this to Needs Triage in Pull Request Review Jul 12, 2025
@hsiangkao hsiangkao changed the title erofs-snapshotter: make IMMUTABLE_FL optional [release/2.1] erofs-snapshotter: make IMMUTABLE_FL optional Jul 12, 2025
@hsiangkao
Copy link
Copy Markdown
Member Author

@github-project-automation github-project-automation bot moved this from Needs Triage to Review In Progress in Pull Request Review Jul 13, 2025
@mxpv mxpv merged commit b73efa5 into containerd:release/2.1 Jul 13, 2025
98 of 101 checks passed
@github-project-automation github-project-automation bot moved this from Review In Progress to Done in Pull Request Review Jul 13, 2025
@hsiangkao hsiangkao deleted the erofs-release-2.1 branch July 14, 2025 05:40
@dmcgowan dmcgowan changed the title [release/2.1] erofs-snapshotter: make IMMUTABLE_FL optional [release/2.1] Update erofs snapshotter to make immutable optional Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants