From: "G. Richard Bellamy" <rbellamy@pteradigm.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Large files, nodatacow and fragmentation
Date: Mon, 11 Aug 2014 11:36:46 -0700 [thread overview]
Message-ID: <CADw2B2Neg6-iG4uwGoW6XPomY4+-1BkUTx-7zPrAZPS6R3pRYg@mail.gmail.com> (raw)
I've been playing with btrfs as a backing store for my KVM images.
I've used 'chattr +C' on the directory where those images are stored.
You can see my recipe below [1]. I've read the gotchas found here [2]
I'm having continuing performance issues inside the Guest VM that is
created inside the btrfs subvolume, using a qcow2 format. I'm having a
hard time determining whether the issues are related to KVM or btrfs,
or if this is even a reasonable topic of discussion.
I've seen the comments on this list saying that if I want a COW
filesystem with sparse files, that I'd be better off with ZFS. I'd
like to use an in-tree COW filesystem, but if it's just not gonna
happen yet with btrfs, I guess that's just the way it is.
That being said, how would I determine what the root issue is?
Specifically, the qcow2 file in question seems to have increasing
fragmentation, even with the No_COW attr.
[1]
$ mkfs.btrfs -m raid10 -d raid10 /dev/sda /dev/sdb /dev/sdc /dev/sdd
$ mount /dev/sda /mnt
$ cd /mnt
$ btrfs create subvolume __data
$ btrfs create subvolume __data/libvirt
$ cd /
$ umount /mnt
$ mount /dev/sda /var/lib/libvirt
$ chattr +C /var/lib/libvirt/images
$ cp /run/media/rbellamy/433acf1d-a1a4-4596-a6a7-005e643b24e0/libvirt/images/atlas.qcow2
/var/lib/libvirt/images/
$ filefrag /var/lib/libvirt/images/atlas.qcow2
/var/lib/libvirt/images/atlas.qcow2: 0 extents found
[START UP THE VM - DO SOME THINGS]
$ filefrag /var/lib/libvirt/images/atlas.qcow2
/var/lib/libvirt/images/atlas.qcow2: 12236 extents found
[START UP THE VM - DO SOME THINGS]
$ filefrag /var/lib/libvirt/images/atlas.qcow2
/var/lib/libvirt/images/atlas.qcow2: 34988 extents found
[2]
https://btrfs.wiki.kernel.org/index.php/Gotchas
next reply other threads:[~2014-08-11 18:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 18:36 G. Richard Bellamy [this message]
2014-08-11 19:14 ` Large files, nodatacow and fragmentation Roman Mamedov
2014-08-11 21:37 ` G. Richard Bellamy
2014-08-11 23:31 ` Chris Murphy
2014-08-14 3:57 ` G. Richard Bellamy
2014-08-14 4:23 ` Chris Murphy
2014-08-14 14:30 ` G. Richard Bellamy
2014-08-14 15:05 ` Austin S Hemmelgarn
2014-08-14 18:15 ` G. Richard Bellamy
2014-08-14 18:40 ` Chris Murphy
2014-08-14 23:16 ` G. Richard Bellamy
2014-08-15 1:05 ` Chris Murphy
2014-09-02 18:31 ` G. Richard Bellamy
2014-09-02 19:17 ` Chris Murphy
2014-09-02 19:17 ` Austin S Hemmelgarn
2014-09-02 23:30 ` G. Richard Bellamy
2014-09-03 6:01 ` Chris Murphy
2014-09-03 6:26 ` Chris Murphy
2014-09-03 15:45 ` G. Richard Bellamy
2014-09-03 18:53 ` Clemens Eisserer
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=CADw2B2Neg6-iG4uwGoW6XPomY4+-1BkUTx-7zPrAZPS6R3pRYg@mail.gmail.com \
--to=rbellamy@pteradigm.com \
--cc=linux-btrfs@vger.kernel.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).