linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Dunlop <chris@onthe.net.au>
To: Dave Chinner <david@fromorbit.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, linux-xfs@vger.kernel.org
Subject: Re: Mysterious ENOSPC [was: XFS fallocate implementation incorrectly reports ENOSPC]
Date: Sat, 28 Aug 2021 13:58:24 +1000	[thread overview]
Message-ID: <20210828035824.GA3654894@onthe.net.au> (raw)
In-Reply-To: <20210828002137.GA3642069@onthe.net.au>

On Sat, Aug 28, 2021 at 10:21:37AM +1000, Chris Dunlop wrote:
> On Sat, Aug 28, 2021 at 08:03:43AM +1000, Dave Chinner wrote:
>> commit fd43cf600cf61c66ae0a1021aca2f636115c7fcb
>> Author: Brian Foster <bfoster@redhat.com>
>> Date:   Wed Apr 28 15:06:05 2021 -0700
>>
>>   xfs: set aside allocation btree blocks from block reservation
>
> Oh wow. Yes, sounds like a candidate. Is there same easy(-ish?) way of 
> seeing if this fs is likely to be suffering from this particular issue 
> or is it a matter of installing an appropriate kernel and seeing if 
> the problem goes away?

Is this sufficient to tell us that this filesystem probably isn't suffering 
from that issue?

$ sudo xfs_db -r -c 'freesp -s' /dev/mapper/vg00-chroot
    from      to extents  blocks    pct
       1       1   74943   74943   0.00
       2       3   71266  179032   0.01
       4       7  155670  855072   0.04
       8      15  304838 3512336   0.17
      16      31  613606 14459417   0.72
      32      63 1043230 47413004   2.35
      64     127 1130921 106646418   5.29
     128     255 1043683 188291054   9.34
     256     511  576818 200011819   9.93
     512    1023  328790 230908212  11.46
    1024    2047  194784 276975084  13.75
    2048    4095  119242 341977975  16.97
    4096    8191   72903 406955899  20.20 
    8192   16383    5991 67763286   3.36
   16384   32767    1431 31354803   1.56
   32768   65535     310 14366959   0.71 
   65536  131071     122 10838153   0.54 
  131072  262143      87 15901152   0.79
  262144  524287      44 17822179   0.88
  524288 1048575      16 12482310   0.62
1048576 2097151      14 20897049   1.04
4194304 8388607       1 5213142   0.26
total free extents 5738710
total free blocks 2014899298
average free extent size 351.107

Or from:

How to tell how fragmented the free space is on an XFS filesystem?
https://www.suse.com/support/kb/doc/?id=000018219

Based on xfs_info "agcount=32":

$ {
   for AGNO in {0..31}; do
     sudo /usr/sbin/xfs_db -r -c "freesp -s -a $AGNO" /dev/mapper/vg00-chroot > /tmp/ag${AGNO}.txt
   done
   grep -h '^average free extent size' /tmp/ag*.txt | sort -k5n | head -n5
   echo --
   grep -h '^average free extent size' /tmp/ag*.txt | sort -k5n | tail -n5
}
average free extent size 66.7806
average free extent size 79.201
average free extent size 80.221
average free extent size 87.595
average free extent size 103.079
--
average free extent size 898.962
average free extent size 906.709
average free extent size 1001.18
average free extent size 1849.23
average free extent size 2782.75

Even those ags with the lowest average free extent size are higher than what 
the web page suggests is "an AG in fairly good shape".

Cheers,

Chris

  reply	other threads:[~2021-08-28  3:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  2:06 XFS fallocate implementation incorrectly reports ENOSPC Chris Dunlop
2021-08-26 15:05 ` Eric Sandeen
2021-08-26 20:56   ` Chris Dunlop
2021-08-27  2:55     ` Chris Dunlop
2021-08-27  5:49       ` Dave Chinner
2021-08-27  6:53         ` Chris Dunlop
2021-08-27 22:03           ` Dave Chinner
2021-08-28  0:21             ` Mysterious ENOSPC [was: XFS fallocate implementation incorrectly reports ENOSPC] Chris Dunlop
2021-08-28  3:58               ` Chris Dunlop [this message]
2021-08-29 22:04                 ` Dave Chinner
2021-08-30  4:21                   ` Darrick J. Wong
2021-08-30  7:40                     ` Chris Dunlop
2021-08-30  7:37                   ` Mysterious ENOSPC Chris Dunlop
2021-09-02  1:42                     ` Dave Chinner
2021-09-17  6:07                       ` Chris Dunlop

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=20210828035824.GA3654894@onthe.net.au \
    --to=chris@onthe.net.au \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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;
as well as URLs for NNTP newsgroup(s).