From: cwillu <cwillu@cwillu.com>
To: ching <lsching17@gmail.com>
Cc: Felix Pepinghege <postfach@pepinghege.net>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Why btrfs inline small file by default?
Date: Tue, 30 Oct 2012 16:16:41 -0600 [thread overview]
Message-ID: <CAE5mzvg4o6bfq9on_VdrWNzi3YCMBbusCfi9yicHecnuQTRB2w@mail.gmail.com> (raw)
In-Reply-To: <50904949.8010603@gmail.com>
On Tue, Oct 30, 2012 at 3:40 PM, ching <lsching17@gmail.com> wrote:
> On 10/30/2012 08:17 PM, cwillu wrote:
>>>> If there is a lot of small files, then the size of metadata will be
>>>> undesirable due to deduplication
>>>
>>> Yes, that is a fact, but if that really matters depends on the use-case
>>> (e.g., the small files to large files ratio, ...). But as btrfs is designed
>>> explicitly as a general purpose file system, you usually want the good
>>> performance instead of the better disk-usage (especially as disk space isn't
>>> expensive anymore).
>> As I understand it, in basically all cases the total storage used by
>> inlining will be _smaller_, as the allocation doesn't need to be
>> aligned to the sector size.
>>
>
> if i have 10G small files in total, then it will consume 20G by default.
>
> ching
No. No they will not. As I already explained.
root@repository:/mnt$ mount ~/inline /mnt -o loop
root@repository:/mnt$ mount ~/inline /mnt2 -o loop,max_inline=0
root@repository:/mnt$ mount
/dev/loop0 on /mnt type btrfs (rw)
/dev/loop1 on /mnt2 type btrfs (rw,max_inline=0)
root@repository:/mnt$ time for x in {1..243854}; do echo "some stuff"
> /mnt/$x; done
real 1m5.447s
user 0m38.422s
sys 0m18.493s
root@repository:/mnt$ time for x in {1..243854}; do echo "some stuff"
> /mnt2/$x; done
real 1m49.880s
user 0m40.379s
sys 0m26.210s
root@repository:/mnt$ df /mnt /mnt2
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 10485760 266952 8359680 4% /mnt
/dev/loop1 10485760 1311620 7384236 16% /mnt2
root@repository:/mnt$ btrfs fi df /mnt
Data: total=1.01GB, used=256.00KB
System, DUP: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=1.00GB, used=130.22MB
Metadata: total=8.00MB, used=0.00
root@repository:/mnt$ btrfs fi df /mnt2
Data: total=2.01GB, used=953.05MB
System, DUP: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=1.00GB, used=164.03MB
Metadata: total=8.00MB, used=0.00
root@repository:/mnt$ btrfs fi show
Label: none uuid: e5440337-9f44-4b2d-9889-80ab0ab8f245
Total devices 1 FS bytes used 130.47MB
devid 1 size 10.00GB used 3.04GB path /dev/loop0
Label: none uuid: cfcc4149-3102-465d-89b8-0a6bb6a4749a
Total devices 1 FS bytes used 1.09GB
devid 1 size 10.00GB used 4.04GB path /dev/loop1
Btrfs Btrfs v0.19
Any questions?
next prev parent reply other threads:[~2012-10-30 22:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 11:04 Why btrfs inline small file by default? ching
2012-10-30 12:04 ` Felix Pepinghege
2012-10-30 12:17 ` cwillu
2012-10-30 21:40 ` ching
2012-10-30 22:14 ` Hugo Mills
2012-10-30 22:19 ` Hugo Mills
2012-10-30 23:47 ` ching
2012-10-31 0:12 ` David Sterba
2012-10-31 21:07 ` ching
2012-10-31 0:18 ` cwillu
2012-10-31 8:48 ` Ahmet Inan
2012-10-31 9:39 ` cwillu
2012-10-31 10:48 ` Ahmet Inan
2012-10-31 10:55 ` Michael Kjörling
2012-10-31 11:10 ` Ahmet Inan
2012-10-31 10:57 ` cwillu
2012-10-31 11:56 ` Michael Kjörling
2012-10-31 13:27 ` Ahmet Inan
2012-10-31 13:44 ` Roman Mamedov
2012-10-31 21:05 ` ching
2012-10-30 22:16 ` cwillu [this message]
2012-10-30 23:41 ` ching
2012-10-30 21:39 ` ching
2012-10-30 12:11 ` Felix Pepinghege
2012-10-30 12:13 ` Mitch Harder
2012-10-30 16:38 ` David Sterba
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=CAE5mzvg4o6bfq9on_VdrWNzi3YCMBbusCfi9yicHecnuQTRB2w@mail.gmail.com \
--to=cwillu@cwillu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lsching17@gmail.com \
--cc=postfach@pepinghege.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).