From: Chris Mason <chris.mason@oracle.com>
To: Mitch Harder <mitch.harder@sabayonlinux.org>
Cc: Daniel J Blueman <daniel.blueman@gmail.com>,
Bernhard Schmidt <berni@birkenwald.de>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: abysmal performance
Date: Tue, 03 May 2011 12:51:58 -0400 [thread overview]
Message-ID: <1304441429-sup-4233@think> (raw)
In-Reply-To: <BANLkTi=0+UQeBX7Un7b1dqY-D6dA4t1_YQ@mail.gmail.com>
Excerpts from Mitch Harder's message of 2011-05-03 11:42:56 -0400:
> On Tue, May 3, 2011 at 9:41 AM, Daniel J Blueman
> <daniel.blueman@gmail.com> wrote:
> >
> > It does seem the case generally; on 2.6.39-rc5, writing to a fresh
> > filesystem using rsync with BTRFS compression enabled, 128KB extents
> > seem very common [1] (filefrag inconsistency noted).
> >
> > Defragmenting with compression gives a nice linear extent [2]. It
> > looks like it'll be a good win to prevent extents being split at
> > writeout for the read case on rotational media.
> >
>
> Yes, 128KB extents are hardcoded in Btrfs right now.
>
> There are two reasons cited in the comments for this:
>
> (1) Ease the RAM required when spreading compression across several CPUs.
> (2) Make sure the amount of IO required to do a random read is
> reasonably small.
>
> For about 4 months, I've been playing locally with 2 patches to
> increase the extent size to 512KB.
>
> I haven't noticed any issues running with these patches. However, I
> only have a Core2duo with 2 CPUs, so I'm probably not running into
> issues that someone with more CPUs might encounter.
>
> I'll submit these patches to the list as an RFC so more people can at
> least see where this is done. But with my limited hardware, I can't
> assert this change is the best for everyone.
The problem is just that any random read into the file will require
reading the full 512KB in order to decompress the extent. And you need
to make sure you have enough room in ram to represent the decompressed
bytes in order to find the pages you care about.
The alternative is to keep the smaller compressed extent size and make
the allocator work harder to find contiguous 128KB extents to store all
of the file bytes. This will work out much better ;)
-chris
next prev parent reply other threads:[~2011-05-03 16:51 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 14:46 abysmal performance John Wyzer
2011-04-29 15:01 ` Chris Mason
2011-04-30 17:33 ` Mitch Harder
2011-04-30 20:40 ` John Wyzer
2011-04-30 22:16 ` Mitch Harder
2011-04-30 22:33 ` John Wyzer
2011-05-03 11:05 ` Chris Mason
2011-05-03 11:06 ` Chris Mason
2011-04-30 23:55 ` Peter Stuge
2011-05-03 10:33 ` Bernhard Schmidt
2011-05-03 11:00 ` cwillu
2011-05-03 11:26 ` Bernhard Schmidt
2011-05-03 11:08 ` Chris Mason
2011-05-03 11:30 ` Bernhard Schmidt
2011-05-03 11:36 ` Chris Mason
2011-05-03 11:43 ` Bernhard Schmidt
2011-05-03 12:52 ` Chris Mason
2011-05-03 13:03 ` Bernhard Schmidt
2011-05-03 13:41 ` Mitch Harder
2011-05-03 14:41 ` Daniel J Blueman
2011-05-03 15:42 ` Mitch Harder
2011-05-03 16:51 ` Chris Mason [this message]
2011-05-03 14:54 ` Daniel J Blueman
2011-05-03 15:10 ` Bernhard Schmidt
[not found] ` <1304100271-sup-4177@localhost>
[not found] ` <1304100862-sup-1493@think>
[not found] ` <1304107977-sup-3815@localhost>
[not found] ` <1304110058-sup-7292@think>
[not found] ` <1304146193-sup-2200@localhost>
2011-04-30 20:51 ` John Wyzer
-- strict thread matches above, loose matches on Subject: below --
2011-06-20 21:51 Abysmal Performance Henning Rohlfs
2011-06-21 0:12 ` Josef Bacik
2011-06-21 7:10 ` Henning Rohlfs
2011-06-21 8:00 ` Sander
2011-06-21 9:26 ` Henning Rohlfs
2011-06-21 15:18 ` Josef Bacik
2011-06-21 16:55 ` Henning Rohlfs
2011-06-21 15:24 ` Calvin Walton
2011-06-22 14:15 ` Henning Rohlfs
2011-06-22 15:39 ` Josef Bacik
2011-06-22 15:57 ` Calvin Walton
2011-06-22 15:58 ` Josef Bacik
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=1304441429-sup-4233@think \
--to=chris.mason@oracle.com \
--cc=berni@birkenwald.de \
--cc=daniel.blueman@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mitch.harder@sabayonlinux.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;
as well as URLs for NNTP newsgroup(s).