All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Steigerwald <Martin@lichtvoll.de>
To: Hugo Mills <hugo@carfax.org.uk>,
	Sergei Trofimovich <slyich@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: speeding up slow btrfs filesystem
Date: Sat, 17 Dec 2011 17:35:15 +0100	[thread overview]
Message-ID: <201112171735.15402.Martin@lichtvoll.de> (raw)
In-Reply-To: <20111217114508.GE17573@carfax.org.uk>

Am Samstag, 17. Dezember 2011 schrieb Hugo Mills:
> > I might still be doing the balance for that optical viewing pleasure
> > ;).
> 
>    :)
> 
>    It can't hurt, and with such a small FS it probably won't take
> long.

Now I first did a defrag and then a balance. The balance was heavier I had 
music stalls of about 5 to 10 seconds at time.

The defrag aborted  quickly with a non-zero return code on second run:

deepdance:~> btrfs filesystem defragment /
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C

I wanted to start it via time.

deepdance:~> /usr/bin/time btrfs filesystem defragment /
Command exited with non-zero status 20
0.00user 1.26system 0:03.86elapsed 32%CPU (0avgtext+0avgdata 
2160maxresident)k
2656inputs+70712outputs (2major+184minor)pagefaults 0swaps

Nothing in dmesg. Does 20 as return code mean "already defragmented"? ;)

I am looking forward to the new asynchronous defrag interface I read about 
somewhere.

Current state now is:

deepdance:~> btrfs filesystem df /                   
Data: total=7.75GB, used=6.91GB
System, DUP: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=896.00MB, used=506.47MB

Lets see how that fares.

Balance did log something:

[24065.740937] btrfs: found 4207 extents
[24075.581494] btrfs: found 4207 extents
[24077.982099] btrfs: relocating block group 24465375232 flags 1
[24090.418623] btrfs: found 1152 extents
[24099.195646] btrfs: found 1152 extents
[24100.994087] btrfs: relocating block group 24196939776 flags 1
[24124.823654] btrfs: found 3857 extents
[24140.208385] btrfs: found 3857 extents
[24142.334232] btrfs: relocating block group 23928504320 flags 1
[24164.219827] btrfs: found 534 extents
[24171.483027] btrfs: found 534 extents
[24176.021604] btrfs: relocating block group 23391633408 flags 1
[24230.123062] btrfs: found 8607 extents
[24255.193673] btrfs: found 8607 extents
[24258.142945] btrfs: relocating block group 22586327040 flags 1
[24271.875868] btrfs: relocating block group 22452109312 flags 36
[24322.334007] btrfs: found 19112 extents
[24324.253074] btrfs: relocating block group 22317891584 flags 36
[24361.999904] btrfs: found 6934 extents
[24362.927413] btrfs: relocating block group 22183673856 flags 36
[24393.151548] btrfs: found 9031 extents
[24395.447755] btrfs: relocating block group 22049456128 flags 36
[24432.611355] btrfs: found 13216 extents
[24435.508280] btrfs: relocating block group 20975714304 flags 1
[24574.903545] btrfs: found 14600 extents
[24642.613698] btrfs: found 14586 extents
[24647.144462] btrfs: relocating block group 20841496576 flags 36
[24730.473343] btrfs: found 19754 extents
[24735.912210] btrfs: relocating block group 20707278848 flags 36
[24852.827906] btrfs: found 26482 extents
[24853.838002] btrfs: relocating block group 20698890240 flags 34
[24854.825685] btrfs: found 1 extents
[24855.858015] btrfs: relocating block group 20564672512 flags 36
[25001.321705] btrfs: found 31648 extents
[25002.330616] btrfs: relocating block group 20430454784 flags 36
[25170.694953] btrfs: found 30709 extents
[25173.027484] btrfs: relocating block group 20296237056 flags 36
[25240.022780] btrfs: found 19729 extents
[25242.373217] btrfs: relocating block group 20162019328 flags 36
[25293.659547] btrfs: found 11857 extents
[25294.514415] btrfs: relocating block group 20027801600 flags 36
[25381.873449] btrfs: found 20892 extents
[25382.837313] btrfs: relocating block group 18954059776 flags 1
[25407.731124] btrfs: relocating block group 17880317952 flags 1
[25528.179185] btrfs: found 13850 extents
[25572.737920] btrfs: found 13831 extents
[25574.017807] btrfs: found 1 extents
[25577.603801] btrfs: relocating block group 16806576128 flags 1
[25667.266953] btrfs: found 2448 extents
[25689.503862] btrfs: found 2448 extents
[25691.924348] btrfs: relocating block group 15732834304 flags 1
[25796.270409] btrfs: found 11264 extents
[25838.860555] btrfs: found 11264 extents
[25843.971106] btrfs: relocating block group 14659092480 flags 1
[25959.486034] btrfs: found 18680 extents
[26037.370148] btrfs: found 18680 extents
[26040.637078] btrfs: relocating block group 13585350656 flags 1
[26131.997384] btrfs: found 26798 extents
[26211.759652] btrfs: found 26787 extents
[26215.846016] btrfs: relocating block group 12511608832 flags 1
[26331.196068] btrfs: found 33247 extents
[26470.846542] btrfs: found 33197 extents
[26479.487194] btrfs: relocating block group 12377391104 flags 36
[26503.391492] btrfs: found 4410 extents
[26507.133189] btrfs: relocating block group 11303649280 flags 1
[26607.401285] btrfs: found 32999 extents
[26770.759705] btrfs: found 32926 extents
[26778.218628] btrfs: relocating block group 11169431552 flags 36
[26921.757006] btrfs: found 23449 extents
[26922.956668] btrfs: relocating block group 11035213824 flags 36
[27047.652332] btrfs: found 21526 extents

Appears quite fragmented to me, but as I do not understand whats exactly 
behind this numbers I leave it as it.

Thanks,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

  parent reply	other threads:[~2011-12-17 16:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16 17:51 speeding up slow btrfs filesystem Martin Steigerwald
2011-12-16 17:54 ` Martin Steigerwald
2011-12-16 18:38   ` Goffredo Baroncelli
2011-12-16 19:53     ` Martin Steigerwald
2011-12-16 20:58       ` Martin Steigerwald
2011-12-17  7:03         ` Sergei Trofimovich
2011-12-17 11:09           ` Martin Steigerwald
2011-12-17 11:26             ` Hugo Mills
2011-12-17 11:38               ` Martin Steigerwald
2011-12-17 11:45                 ` Hugo Mills
2011-12-17 11:57                   ` Martin Steigerwald
2011-12-17 16:35                   ` Martin Steigerwald [this message]
2011-12-17 17:27                     ` Hugo Mills
2011-12-17 11:39       ` Goffredo Baroncelli
2011-12-18 18:41     ` Andrea Gelmini
2011-12-20 19:46       ` Goffredo Baroncelli
2011-12-17 11:11 ` Chris Samuel
2011-12-17 12:00   ` Martin Steigerwald
2011-12-17 12:42     ` David McBride
2011-12-17 16:14       ` Martin Steigerwald
2011-12-17 11:54 Martin Steigerwald
2011-12-17 12:02 ` Martin Steigerwald
2011-12-17 12:50 ` Goffredo Baroncelli
2011-12-17 16:10   ` Martin Steigerwald

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=201112171735.15402.Martin@lichtvoll.de \
    --to=martin@lichtvoll.de \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=slyich@gmail.com \
    /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 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.