From e1817a401f94698cdf8fdc01d8d0e2b4f1f463e7 Mon Sep 17 00:00:00 2001 From: Gao Xiang Date: Wed, 14 May 2025 00:11:07 +0800 Subject: [PATCH] docs/snapshotters/erofs.md: a tip for improved performance It's preferred to use `--sort=none` to avoid tar data twice due to stricter data ordering. Link: https://git.kernel.org/xiang/erofs-utils/c/e97530622872 Signed-off-by: Gao Xiang --- docs/snapshotters/erofs.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/snapshotters/erofs.md b/docs/snapshotters/erofs.md index a1097f9f11..87ac51d137 100644 --- a/docs/snapshotters/erofs.md +++ b/docs/snapshotters/erofs.md @@ -86,7 +86,7 @@ loaded (Linux 5.4 or later is required): it can be loaded with `modprobe erofs`. The following configuration can be used in your containerd `config.toml`. Don't forget to restart containerd after changing the configuration. -``` +``` toml [plugins."io.containerd.snapshotter.v1.erofs"] # Enable fsverity support for EROFS layers, default is false enable_fsverity = true @@ -98,6 +98,15 @@ forget to restart containerd after changing the configuration. default = ["erofs","walking"] ``` +Note that if erofs-utils is 1.8.2 or higher, it's preferred to add +`--sort=none` to the differ's `mkfs_options` to avoid unnecessary tar data +reordering for improved performance, as shown below: + +``` toml + [plugins."io.containerd.differ.v1.erofs"] + mkfs_options = ["--sort=none"] +``` + ### Running a container To run a container using the EROFS snapshotter, it needs to be explicitly