public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Anton Mitterer <calestyo@scientia.org>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, linux-btrfs@vger.kernel.org
Subject: Re: btrfs thinks fs is full, though 11GB should be still free
Date: Tue, 12 Dec 2023 04:27:28 +0100	[thread overview]
Message-ID: <2d5838efc179a557b41c84e9ca9a608be6a159e8.camel@scientia.org> (raw)
In-Reply-To: <3cfc3cdf-e6f2-400e-ac12-5ddb2840954d@gmx.com>


Hey.

On Tue, 2023-12-12 at 13:00 +1030, Qu Wenruo wrote:
> IIRC compsize can do it.
> https://github.com/kilobyte/compsize

Okay... that seems promising:


/data/main/prometheus/metrics2# compsize 01H*
Processed 544 files, 399 regular extents (447 refs), 272 inline.
Type       Perc     Disk Usage   Uncompressed Referenced  
TOTAL      100%       37G          37G          23G       
none       100%       37G          37G          23G       

01H* are the subdirs for the "semi-final" chunks.

So here's my stolen storage ;-)
I'm a bit puzzled how that can happen, I mean for the chunks I'd have
naively assumed that they just write them more or less at once and in
sequence.


Interestingly, the WAL seems good, though:
/data/main/prometheus/metrics2# compsize wal/
Processed 3723 files, 1617 regular extents (1617 refs), 0 inline.
Type       Perc     Disk Usage   Uncompressed Referenced  
TOTAL      100%      1.9G         1.9G         1.9G       
none       100%      1.9G         1.9G         1.9G       



One thing I've noted by chance and don't understand:

I assumed "Referenced" was the number of unique bytes actually
references (by someone). So when I run compsize on a single file,
Reference should be the file size?


/data/main/prometheus/metrics2/wal# lll 00001030
251052 -rw-rw-r-- 1 106 106 ? 134217728 2023-12-10 04:51:58.665808973 +0100 00001030

/data/main/prometheus/metrics2/wal# compsize -b 00001030
Processed 1 file, 83 regular extents (83 refs), 0 inline.
Type       Perc     Disk Usage   Uncompressed Referenced  
TOTAL      100%     134451200    134451200    134217728   
none       100%     134451200    134451200    134217728   

=> okay, here it is


/data/main/prometheus/metrics2/wal# lll 00001045
251947 -rw-rw-r-- 1 106 106 ? 33034564 2023-12-10 08:57:01.892017049 +0100 00001045

/data/main/prometheus/metrics2/wal# compsize -b 00001045
Processed 1 file, 316 regular extents (316 refs), 0 inline.
Type       Perc     Disk Usage   Uncompressed Referenced  
TOTAL      100%     33116160     33116160     33038336    
none       100%     33116160     33116160     33038336    

=> here, Referenced is 3772 bytes larger than the actual file size?
   How can that happen?



On Tue, 2023-12-12 at 11:28 +1030, Qu Wenruo wrote:
> 
> 
> But WAL indeeds looks like a bad patter for btrfs.

> Thus we have "autodefrag" mount option for such use case.

Well the manpage warns from using on large DB workloads... I mean
Prometheus is not exactly like a DB, and I would have naively assumed
that at least the chunks were written not as many small random
writes... but apparently they are.

Also, this a VM, so the storage volume is actually something Ceph
backed, which the university's super computing centre provides us with.

I wonder if I do autodefrag on all that, if it doesn't just kill of our
performance even more?



Thanks :-)

Chris.

  parent reply	other threads:[~2023-12-12  3:27 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 20:26 btrfs thinks fs is full, though 11GB should be still free Christoph Anton Mitterer
2023-12-11 20:57 ` Qu Wenruo
2023-12-11 22:23   ` Christoph Anton Mitterer
2023-12-11 22:26     ` Christoph Anton Mitterer
2023-12-11 23:20     ` Qu Wenruo
2023-12-11 23:38       ` Christoph Anton Mitterer
2023-12-11 23:54         ` Qu Wenruo
2023-12-12  0:12           ` Christoph Anton Mitterer
2023-12-12  0:58             ` Qu Wenruo
2023-12-12  2:30               ` Qu Wenruo
2023-12-12  3:27               ` Christoph Anton Mitterer [this message]
2023-12-12  3:40                 ` Christoph Anton Mitterer
2023-12-12  4:13                   ` Qu Wenruo
2023-12-15  2:33                     ` Chris Murphy
2023-12-15  3:12                       ` Qu Wenruo
2023-12-18 16:24                     ` Christoph Anton Mitterer
2023-12-18 19:18                       ` Goffredo Baroncelli
2023-12-18 20:04                         ` Goffredo Baroncelli
2023-12-18 22:38                         ` Christoph Anton Mitterer
2023-12-19  8:22                           ` Andrei Borzenkov
2023-12-19 19:09                             ` Goffredo Baroncelli
2023-12-21 13:53                               ` Christoph Anton Mitterer
2023-12-21 18:03                                 ` Goffredo Baroncelli
2023-12-21 22:06                                   ` Christoph Anton Mitterer
2023-12-21 13:46                             ` Christoph Anton Mitterer
2023-12-21 20:41                               ` Qu Wenruo
2023-12-21 22:15                                 ` Christoph Anton Mitterer
2023-12-21 22:41                                   ` Qu Wenruo
2023-12-21 22:54                                     ` Christoph Anton Mitterer
2023-12-22  0:53                                       ` Qu Wenruo
2023-12-22  0:56                                         ` Christoph Anton Mitterer
2023-12-22  1:13                                           ` Qu Wenruo
2023-12-22  1:23                                             ` Christoph Anton Mitterer
2024-01-05  3:30                                             ` Christoph Anton Mitterer
2024-01-05  7:07                                               ` Qu Wenruo
2024-01-06  0:42                                                 ` Christoph Anton Mitterer
2024-01-06  5:40                                                   ` Qu Wenruo
2024-01-06  8:12                                                     ` Andrei Borzenkov
2024-12-14 19:09                                                   ` Christoph Anton Mitterer
2023-12-18 19:54                       ` Qu Wenruo
2023-12-18 22:30                     ` Christoph Anton Mitterer
2023-12-13  1:49                 ` Remi Gauvin
2023-12-13  8:29             ` Andrea Gelmini

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=2d5838efc179a557b41c84e9ca9a608be6a159e8.camel@scientia.org \
    --to=calestyo@scientia.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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