From: "Richter, Rafael" <rafael.richter.extern@gin.de>
To: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: ext4: slow unmount with large clean page cache; is fsfreeze→umount recommended?
Date: Tue, 9 Sep 2025 10:19:11 +0000 [thread overview]
Message-ID: <af4791ab9e5e42fc929ce05e4f313a99@gin.de> (raw)
Hi,
we consistently see slow unmounts (~6–8s) on ext4 after heavy buffered writes
(e.g., dd ~30 GiB) that grow the page cache. Same test on XFS unmounts <1s on
the same hardware, but we must stay on ext4.
Env:
- Kernel: 6.6.36 (Yocto-based)
- Device: SSD via mdraid (/dev/md0p1)
- Mount: ext4 on /mnt/disk (defaults)
Repro:
dd if=/dev/zero of=/mnt/disk/big.bin bs=1M count=30720 status=progress
sync -f /mnt/disk
time umount /mnt/disk # ext4: ~6–8s
Observations:
- Dirty/Writeback are ~0 before unmount.
- `fsfreeze -f /mnt/disk` immediately before `umount` makes unmount very fast.
- `mount -o remount,ro` before `umount` does NOT improve unmount time.
Questions:
1) Is this unmount time expected on ext4 with a large *clean* page cache?
2) Why is XFS unmount much faster here—any ext4-side reasons or regressions?
3) Is `fsfreeze -f` → `umount` acceptable/recommended for shutdown on ext4?
Any ext4/VFS options or per-filesystem methods to reduce unmount time?
Looking forward for an answer!
Thx,
Rafael
next reply other threads:[~2025-09-09 10:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 10:19 Richter, Rafael [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-12 14:20 ext4: slow unmount with large clean page cache; is fsfreeze→umount recommended? Richter, Rafael
2025-09-17 15:58 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af4791ab9e5e42fc929ce05e4f313a99@gin.de \
--to=rafael.richter.extern@gin.de \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.