On Tue, May 16, 2023 at 2:04 PM Paul Neuwirth <mail@paul-neuwirth.nl> wrote:
On Tuesday 2023-05-16 12:51, Andrei Borzenkov wrote:
Date: Tue, 16 May 2023 12:51:24 From: Andrei Borzenkov <arvidjaar@gmail.com> To: users@lists.opensuse.org Subject: Re: "background idle" syncing of filesystems
On Tue, May 16, 2023 at 12:42 PM Paul Neuwirth <mail@paul-neuwirth.nl> wrote:
But why does "sync" (or a sysrq emergency sync) take ages then on shutdown?
Are you sure it is sync? What happens if you call the "sync" command (should wait until sync is completed) - does it take as much time? Do you see disk activity when waiting on shutdown?
sync currently finishes in less then a second, but system uptime is not quite long yet, and currently no high i/o activities, 33GiB buff/cache (at shutdown it's in the 400's). When I had those problems I ran some
So if you try "sync" just before you are going to shut down your system - does it take so much time? There is still not much evidence that it is filesystem sync that slows things down. It could also be some (IO intensive) task that runs as part of shutdown.
things like btrfs deduplication, btrfs defragmentation/compression, working on snapshots, etc. But at shutdown it's definitely the syncing. systemd/kernel/init or whoever is even trying to kill "sd_sync", I also tried sysrq emergency sync, never became the message "emergeny sync complete". last steps I see in the kernel debug output is trying to sync. ultimately it finishes and the pc is shutdown/rebooted. All the while the disk activity led of the pc is illuminated.