From: Larkin Lowrey <llowrey@nuclearwinter.com>
To: linux-btrfs@vger.kernel.org
Subject: Heavy nocow'd VM image fragmentation
Date: Thu, 23 Oct 2014 18:04:43 -0500 [thread overview]
Message-ID: <5449898B.4090708@nuclearwinter.com> (raw)
I have a 240GB VirtualBox vdi image that is showing heavy fragmentation
(filefrag). The file was created in a dir that was chattr +C'd, the file
was created via fallocate and the contents of the orignal image were
copied into the file via dd. I verified that the image was +C.
After initial creation there were about 2800 fragments, according to
filefrag. That doesn't surprise me because this image took up about 60%
of the free space. After an hour of light use the filefrag count was the
same. But, after a day of heavy use, the count is now well over 600,000.
There were no snapshots during the period of use. The fs does not have
compression enabled. These usual suspects don't apply in my case.
The process I used to copy the image to a noCOW image was:
fallocate -n -l $(stat --format %s old.vdi) new.vdi
dd if=old.vdi of=new.vdi conv=notrunc oflags=append bs=1M
Performance does seem much worse in the VM but could it be that the
image isn't actually severely fragmented and I'm just misunderstanding
the output from filefrag?
Is there a problem with how I copied over the old image file?
--Larkin
next reply other threads:[~2014-10-23 23:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 23:04 Larkin Lowrey [this message]
2014-10-24 11:49 ` Heavy nocow'd VM image fragmentation Marc MERLIN
2014-10-25 2:41 ` Robert White
2014-10-25 3:28 ` Duncan
2014-10-26 17:20 ` Larkin Lowrey
2014-10-27 6:44 ` Duncan
2014-10-27 12:04 ` Austin S Hemmelgarn
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=5449898B.4090708@nuclearwinter.com \
--to=llowrey@nuclearwinter.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