From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Peter Waller <peter@scraperwiki.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: ENOSPC with mkdir and rename
Date: Tue, 5 Aug 2014 16:51:44 +0800 [thread overview]
Message-ID: <53E09B20.4020305@cn.fujitsu.com> (raw)
In-Reply-To: <CAFChkqttiPWQ+FquT2FfKE54US7vkeEyQsUT8fuD1BWNhS3k=w@mail.gmail.com>
-------- Original Message --------
Subject: Re: ENOSPC with mkdir and rename
From: Peter Waller <peter@scraperwiki.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2014年08月04日 16:14
> Thanks for responses.
>
> All of this is *very* surprising. I'm not new to BTRFS, I've been
> using it on my own machines for multiple years. I didn't realise there
> was an un-holstered footgun on my lap at this point. How can it be
> made clear how to avoid the ENOSPC problem to myself and other
> sysadmins? Or preferably not exist as a problem?
[snip]
In fact such "defeat"(or whatever) is not really btrfs only problem.
In ext*, there is still similiar behavior: ext* has a up limit on the
number of inode after mkfs.
(When you mkfs.ext*, you are prompt the up limit of inodes)
However other metadata in ext* is stored together with data, so no
ENOSPC problem like btrfs.
Btrfs only makes ENOSPC easier to happen by completly split data and
metadata, and does extra
data reserve for metadata.
If you like the ext* way, as already mentioned you can mkfs.btrfs with
-M flag.
But IMO, some tuning in btrfs chunk allocation algorithm may helps.
For example, we have a 20G disk, and 14G space is allocated to
data/metadata chunks.
Under such sitiuation, if btrfs needs new data chunk, it will allocate
up to 10% of disk, which is 2G.
But if it comes to metadata, it will only allocate up to 256M metadata
chunk.
This makes it very easy to allocate the rest of space all to data chunk.
But if btrfs can use the free space in a more diligent way when space is
not enough,
metadata and data usage should be more balanced and less ENOSPC will occur.
If nobody dislike the idea, I'd like try to implent this later.
Thanks,
Qu
next prev parent reply other threads:[~2014-08-05 8:51 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-02 23:35 ENOSPC with mkdir and rename Peter Waller
2014-08-03 0:28 ` Mitch Harder
2014-08-03 1:52 ` Nick Krause
2014-08-03 2:39 ` Russell Coker
2014-08-03 2:59 ` Nick Krause
2014-08-04 1:38 ` Qu Wenruo
2014-08-04 8:14 ` Peter Waller
2014-08-04 9:22 ` Clemens Eisserer
2014-08-04 9:39 ` Chris Samuel
2014-08-04 9:56 ` Clemens Eisserer
2014-08-04 10:24 ` Chris Samuel
2014-08-05 8:06 ` Duncan
2014-08-05 12:20 ` Russell Coker
2014-08-05 12:58 ` Clemens Eisserer
2014-08-05 13:02 ` Peter Waller
2014-08-10 17:21 ` Martin Steigerwald
2014-08-05 13:36 ` Chris Samuel
2014-08-06 0:04 ` Duncan
2014-08-06 0:38 ` ronnie sahlberg
2014-08-06 1:18 ` Nick Krause
2014-08-04 10:09 ` Peter Waller
2014-08-04 10:22 ` Hugo Mills
2014-08-04 10:31 ` Peter Waller
2014-08-04 10:39 ` Hugo Mills
2014-08-04 10:48 ` Peter Waller
2014-08-04 11:29 ` Hugo Mills
2014-08-04 17:09 ` Austin S Hemmelgarn
2014-08-05 8:20 ` Duncan
2014-08-05 11:31 ` Austin S Hemmelgarn
2014-08-04 11:04 ` Clemens Eisserer
2014-08-04 11:32 ` Hugo Mills
2014-08-04 13:17 ` Peter Waller
2014-08-04 13:35 ` Hugo Mills
2014-08-04 14:02 ` Austin S Hemmelgarn
2014-08-04 14:11 ` Peter Waller
2014-08-04 14:26 ` Austin S Hemmelgarn
2014-08-04 14:47 ` Russell Coker
2014-08-04 15:19 ` Mitch Harder
2014-08-04 10:50 ` Chris Samuel
2014-08-04 10:59 ` Peter Waller
2014-08-04 21:27 ` Chris Samuel
2014-08-10 17:26 ` Martin Steigerwald
2014-08-05 8:51 ` Qu Wenruo [this message]
2014-08-05 12:17 ` Russell Coker
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=53E09B20.4020305@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=peter@scraperwiki.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;
as well as URLs for NNTP newsgroup(s).