From: Roman Mamedov <rm@romanrm.net>
To: linux-btrfs@vger.kernel.org
Subject: Weird behavior (no commit?) when writing to a really slow block device
Date: Sun, 8 Jan 2023 02:03:31 +0500 [thread overview]
Message-ID: <20230108020331.3491fb52@nvm> (raw)
Hello,
I am rsyncing some files from fast devices (100-200 MB/s) to a slow remote one
(15 MB/s) over nbd.
There is some strange behavior, at least on my current kernel 5.10.161:
* free space shown in "df" does NOT decrease even after many hours and
hundreds of GBs already written;
* freshly written files (already fully copied by rsync log) are shown with
their real size in "ls -la", but all have zero size in "du".
I keep an eye on: watch "grep -e Dirty -e Writeback: /proc/meminfo"
This currently shows:
Dirty: 554936 kB
Writeback: 3388616 kB
The latter figure hovers around 3.5-4 GB all the time. For these syncing
setups, I have these settings tweaked on this machine (so I guess it's not as
large as it could have been with 64 GB of RAM):
vm.dirty_background_ratio=5
vm.dirty_ratio=10
As I understand the described weird symptoms would have cleared up if there
was a complete flush of data and metadata. And I suspect issuing a "sync" on
command-line would cause that to occur. But the question is why this didn't
occur on its own, as said above, over many hours of copying? If I disconnect
the block device now, wouldn't everything copied so far be actually lost?
I know there are the "commit" and "flushoncommit" options, but in this case I
haven't overridden either. Mount options are:
rw,noatime,nodiratime,compress=zstd:3,nossd,space_cache=v2,skip_balance,subvolid=5,subvol=/
So if I had to guess, given a slow block device and the constant ongoing write
load trying to stream at a much faster rate, the "commit" doesn't actually
happen, neither in its predefined default interval of 30 seconds, nor during
much much longer (hours).
--
With respect,
Roman
next reply other threads:[~2023-01-07 21:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-07 21:03 Roman Mamedov [this message]
2023-01-08 0:59 ` Weird behavior (no commit?) when writing to a really slow block device Roman Mamedov
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=20230108020331.3491fb52@nvm \
--to=rm@romanrm.net \
--cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox