From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Peter Chant <pete@petezilla.co.uk>, linux-btrfs@vger.kernel.org
Subject: Re: Snapshots slowing system
Date: Wed, 16 Mar 2016 07:39:21 -0400 [thread overview]
Message-ID: <56E945E9.1050005@gmail.com> (raw)
In-Reply-To: <56E88CB2.6020300@petezilla.co.uk>
On 2016-03-15 18:29, Peter Chant wrote:
> On 03/15/2016 03:52 PM, Duncan wrote:
>> Tho even with autodefrag, given the previous relatime and snapshotting,
>> it could be that the free-space in existing chunks is fragmented, which
>> over time and continued usage would force higher file fragmentation
>> despite the autodefrag, since there simply aren't any large contiguous
>> free-space areas left in which to write files.
>>
>
> Hmm. The following returns instantly as if it were a null operation.
> btrfs fi defrag /
That should return almost immediately, as defrag isn't recursive by
default, and / should only have at most about 16-20 directory entries.
>
> I thought though that btrfs fi defrag <name> would only defrag the one
> file or directory?
It does, it's just not recursive unless you tell it to be.
>
> btrfs fi defrag /srv/photos/
> Is considerably slower, it is still running. Disk light is on solid.
> Processes kworker and btrfs-transacti are pretty busy according to iotop.
If you have a lot of items in /srv/photos/ (be it either lots of
individual files, or lots of directories at the top level), then this is
normal, if not, then you may have found a bug.
>>
>> Boot is an exception to the usual btrfs raid1, with a separate working
>> boot partition on one device and its backup on the other, so I can point
>> the BIOS at and boot either one. It's btrfs mixed-bg mode dup, 256 MiB
>> for each of working and backup, which because it's dup means 128 MiB
>> capacity. That's actually a bit small, and why I'll be shrinking the log
>> partition the next time I repartition. Making it 384 MiB dup, for 192
>> MiB capacity, would be much better, and since I can shrink the log
>> partition by that and still keep the main partitions GiB aligned, it all
>> works out.
>>
>
> Slackware uses lilo so I need a separate /boot with something that is
> supported by lilo.
I would like to point out that just because the distribution prefers one
package doesn't mean you can't use another, it's just not quite as easy.
It's worth noting that I do similarly to Duncan in this respect
though, although I provisioned 512MiB when I set things up (and stuck
the BIOS boot partition (because I use GPT on everything these days) in
the unaligned slack space between the partition table and /boot). It
also has the advantage that I can fall back to old versions of the
kernel and initrd if need be when an upgrade fails to boot for some reason.
>
> <snip>
>
>> If I had 500 GiB SSDs like the one you're getting, I could put the media
>> partition on SSDs and be rid of the spinning rust entirely. But I seem
>> to keep finding higher priorities for the money I'd spend on a pair of
>> them...
>
>
> I'm getting one, not two, so the system is raid0. Data is more
> important (and backed up).
If you don't need the full terabyte of space, I would seriously suggest
using raid1 instead of raid0. If you're using SSD's, then you won't get
much performance gain from BTRFS raid0 (because the I/O dispatching is
not particularly smart), and it also makes it more likely that you will
need to rebuild from scratch.
next prev parent reply other threads:[~2016-03-16 11:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 23:03 Snapshots slowing system pete
2016-03-15 15:52 ` Duncan
2016-03-15 22:29 ` Peter Chant
2016-03-16 11:39 ` Austin S. Hemmelgarn [this message]
2016-03-17 21:08 ` Pete
2016-03-18 9:17 ` Duncan
2016-03-18 11:38 ` Austin S. Hemmelgarn
2016-03-18 17:58 ` Pete
2016-03-18 23:58 ` Duncan
2016-03-18 18:16 ` Pete
2016-03-18 18:54 ` Austin S. Hemmelgarn
2016-03-19 0:59 ` Duncan
2016-03-19 1:15 ` Duncan
-- strict thread matches above, loose matches on Subject: below --
2016-03-12 13:01 pete
2016-03-13 3:28 ` Duncan
2016-03-11 20:03 Pete
2016-03-11 23:38 ` boris
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=56E945E9.1050005@gmail.com \
--to=ahferroin7@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=pete@petezilla.co.uk \
/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.