Gentoo Archives: gentoo-dev

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: proj/portage:master commit in: pym/portage/dbapi/
Date: Sat, 26 Nov 2011 15:52:36
Message-Id: CADqQcK4hf2XgmW_5_fDJknny2Bnr1kUKbQnazxe5dk31csdk+A@mail.gmail.com
In Reply to: Re: [gentoo-dev] Re: proj/portage:master commit in: pym/portage/dbapi/ by Rich Freeman
1 On Sat, Nov 26, 2011 at 7:14 PM, Rich Freeman <rich0@g.o> wrote:
2 > isn't supported.  It is available in stable coreutils.  Some speculate
3 > that this option could increase fragmentation (both copies will share
4 > extents from the original file, and have some extents of their own),
5 > but btrfs doesn't overwrite anything in-place so fragmentation is a
6 > potential issue with any file modification (change one byte in the
7
8 Adding to your comments on this:
9
10 To mitigate such issues, newer versions of the btrfs fs driver have
11 automatic online defragmentation as well. Works quite well for
12 moderate fragmentation.
13
14 A particularly ghastly example where fragmentation issues become
15 pathological in nature are files that are fsync()ed very frequently. A
16 typical example are the *.sqlite files in ~/.mozilla which easily get
17 hundreds or even thousands of fragments after a few hours worth of
18 firefox usage (can be verified with filefrag).
19
20 To fix such things, regular online defragmentation of those specific
21 files can be done using `btrfs fi defrag <file>`.
22
23 --
24 ~Nirbheek Chauhan
25
26 Gentoo GNOME+Mozilla Team