All of lore.kernel.org
 help / color / mirror / Atom feed
* Horrible btrfs performance due to fragmentation
@ 2010-10-31 19:58 Felipe Contreras
  2010-10-31 22:25   ` cwillu
  2010-11-02  0:55 ` Chris Mason
  0 siblings, 2 replies; 11+ messages in thread
From: Felipe Contreras @ 2010-10-31 19:58 UTC (permalink / raw)
  To: Calvin Walton; +Cc: Linux Kernel Mailing List, linux-btrfs, Chris Mason

On Mon, Oct 11, 2010 at 6:46 PM, Calvin Walton <calvin.walton@gmail.com> wrote:
> On Mon, 2010-10-11 at 03:30 +0300, Felipe Contreras wrote:
>> I use btrfs on most of my volumes on my laptop, and I've always felt
>> booting was very slow, but definitely sure is slow, is starting up
>> Google Chrome:
>>
>> encrypted ext4: ~20s
>> btrfs: ~2:11s
>>
>> I have tried different things to find out exactly what is the issue,
>> but haven't quite found it yet.
>
> If you've been using this volume for a while, it could just have become
> badly fragmented. You could try btrfs's fancy online defragmentation
> abilities to see if that'll give you an improvement:
>
> # btrfs filesystem defragment /mountpoint/of/volume
>
> Let us know if that helps, of course :)

I finally managed to track down this issue. Indeed the fragmentation
is horrible, and 'btrfs filesystem defragment' doesn't help:

% cat History-old > History
% btrfs filesystem defragment /home
% echo 3 > /proc/sys/vm/drop_caches

% time dd if=History of=/dev/null && time dd if=History-old of=/dev/null
109664+0 records in
109664+0 records out
56147968 bytes (56 MB) copied, 1.90015 s, 29.5 MB/s
dd if=History of=/dev/null  0.08s user 0.29s system 15% cpu 2.458 total
109664+0 records in
109664+0 records out
56147968 bytes (56 MB) copied, 97.772 s, 574 kB/s
dd if=History-old of=/dev/null  0.07s user 0.80s system 0% cpu 1:37.79 total

I think this is a serious issue that *must* be fixed for 1.0. I filed
a bug for this:
https://bugzilla.kernel.org/show_bug.cgi?id=21562

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-11-02  0:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-31 19:58 Horrible btrfs performance due to fragmentation Felipe Contreras
2010-10-31 22:25 ` cwillu
2010-10-31 22:25   ` cwillu
2010-10-31 22:36   ` Felipe Contreras
2010-10-31 22:36     ` Felipe Contreras
2010-10-31 22:47     ` Hugo Mills
2010-11-01 15:58       ` Felipe Contreras
2010-11-01 15:58         ` Felipe Contreras
2010-11-01 16:09         ` Gregory Maxwell
2010-11-01 16:09           ` Gregory Maxwell
2010-11-02  0:55 ` Chris Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.