Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Pedro Macedo <pmacedo@pmacedo.com>
To: linux-btrfs@vger.kernel.org
Subject: Profile conversion - unexpected large allocation on target profile during conversion
Date: Thu, 30 May 2024 14:36:25 +0200	[thread overview]
Message-ID: <4122a35a-a7ba-4deb-8db9-6e67647f53cd@pmacedo.com> (raw)

Hi folks,

I'm in the process of converting a few btrfs arrays from single to raid 
6 and noticed one behavior that seems unexpected: according to btrfs 
filesystem usage, the total value is extremely large compared to the 
used value during the conversion.

For example, on one filesystem this is the reported total/used while 
conversion is running - notice the 2TB allocation for ~370GB of data:

Data,single: Size:40032.00GiB, Used:39982.40GiB (99.88%)
Data,RAID6: Size:2021.09GiB, Used:376.60GiB (18.63%)
Metadata,RAID1C4: Size:84.00GiB, Used:83.47GiB (99.37%)
System,RAID1C4: Size:0.03GiB, Used:0.00GiB (14.06%)

If I cancel the conversion and give it a few seconds then the vast 
majority of the reported space for raid6 is reclaimed 
(bg_reclaim_threshold is set to a very high 75%, but I don't see the 
usual log messages about reclaiming used blocks):

Data,single: Size:40023.00GiB, Used:39973.42GiB (99.88%)
Data,RAID6: Size:406.25GiB, Used:384.58GiB (94.67%)
Metadata,RAID1C4: Size:84.00GiB, Used:83.47GiB (99.37%)
System,RAID1C4: Size:0.03GiB, Used:0.00GiB (14.01%)

Is this over-allocation during conversion expected or known? This is on 
kernel 6.8.9; I only really noticed this because one of the filesystems 
failed the conversion with ENOSPC even though there should be plenty of 
space. For now I'm working around the ENOSPC issue on the smaller array 
by using a loop with dconvert=raid6,limit=100 followed by a 30s sleep.


Thanks,

Pedro Macedo



             reply	other threads:[~2024-05-30 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 12:36 Pedro Macedo [this message]
2024-05-30 17:47 ` Profile conversion - unexpected large allocation on target profile during conversion Pedro Macedo

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=4122a35a-a7ba-4deb-8db9-6e67647f53cd@pmacedo.com \
    --to=pmacedo@pmacedo.com \
    --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