erofs-snapshotter: make IMMUTABLE_FL optional to recover performance#12072
Merged
fuweid merged 1 commit intocontainerd:mainfrom Jul 11, 2025
erofs:erofs-snapshotter
Merged
erofs-snapshotter: make IMMUTABLE_FL optional to recover performance#12072fuweid merged 1 commit intocontainerd:mainfrom erofs:erofs-snapshotter
fuweid merged 1 commit intocontainerd:mainfrom
erofs:erofs-snapshotter
Conversation
Member
Author
AkihiroSuda
reviewed
Jul 9, 2025
AkihiroSuda
reviewed
Jul 9, 2025
AkihiroSuda
reviewed
Jul 9, 2025
cpuguy83
requested changes
Jul 9, 2025
Member
Author
|
Hi @cpuguy83 @AkihiroSuda could you take a look again? Cc @dmcgowan @fuweid @djdongjin |
AkihiroSuda
approved these changes
Jul 10, 2025
cpuguy83
requested changes
Jul 10, 2025
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>
cpuguy83
approved these changes
Jul 10, 2025
Member
Author
|
@AkihiroSuda need another try, it falls into flakyness sadly. :( |
fuweid
approved these changes
Jul 11, 2025
Member
Author
|
(... finally... I will try to cherry-pick it into 2.1 later since it impacts launch performance.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling the IMMUTABLE_FL file attribute causes dirty data to be flushed synchronously at least on EXT4[1], which can greatly impact container launch performance. In contrast, the overlayfs snapshotter does not use
syncfsby 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.
Test commands:
Results:
Test commands:
Results:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ext4/ioctl.c?h=v6.15#n636