Files
containerd/plugins/snapshots/erofs/plugin/plugin_linux.go
Gao Xiang 8d194c19fe erofs-snapshotter: make IMMUTABLE_FL optional
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>
2025-07-12 13:03:00 +08:00

2.2 KiB