linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: abysmal rm performance?
Date: Mon, 22 Jul 2013 10:39:25 +0000 (UTC)	[thread overview]
Message-ID: <pan$e8fb1$a4cde2ce$20a617b6$10f5d98a@cox.net> (raw)
In-Reply-To: 827cf884b1a6e12db95beea6912d946b@admin.virtall.com

Tomasz Chmielewski posted on Mon, 22 Jul 2013 12:22:11 +0700 as excerpted:

>> You /really/ need to read up on the btrfs wiki.
>> 
>> The short answer is yes, btrfs does a LOT more metadata processing due
>> to the checksumming it does by default.
> 
> According to the wiki, checksumming has barely any influence, so I guess
> the above advice is not really helpful?
> 
> https://btrfs.wiki.kernel.org/index.php/Mount_options
> 
> 	nodatasum (...)
> 	On most modern CPUs this option does not result in any reasonable
> 	performance improvement.

It's worth noting that in the context of the full description, that's 
referencing data write performance as that's where the checksumming would 
be done and the CPU performance would matter, not really delete 
performance, where the bottleneck is likely to be the storage device seek 
times.

However, being a user not a btrfs dev, and not having actually tested it, 
what I do NOT know is whether that option disables just the calculation, 
so the same seeks would be done and the same "unmetadata" (given the file 
was written with nodatasum) would be erased in any case, or if it short 
circuits the entire process.

It might be worth some benchmarks to see...

> btrfs:
> 
> Data, RAID1: total=1.73TB, used=1.36TB System, RAID1: total=32.00MB,
> used=264.00KB System: total=4.00MB, used=0.00 Metadata, RAID1:
> total=79.00GB, used=70.23GB
> 
> 
> Quite high metadata usage here.

Yes.  It's worth noting, however, that btrfs does store small files 
directly in the inode metadata itself, rather than in separate data 
extents.  So that can be considered too and may be part of it.

> The filesystems on ext4 and btrfs are copies; there are >30 milion
> inodes on ext4; most of the files have multiple hardlinks.

Hardlinks:  Until recently btrfs has problems if there were too many 
hardlinks in a directory.  They fixed that, but if you're doing a LOT of 
hardlinking, it may well be that is playing some part, as I don't know 
how performant the new code is.  It may be worth reading the list 
archives on that topic.

> So paraphrasing my question: is there anything to improve "rm"
> performance with btrfs?
> 
> "nodatacow" might help a bit, but then, it disabled the compression,
> which is a major drawback.

I have a strong suspicion nobarrier may help quite a bit with high-number 
delete loads, tho of course it DOES come with data corruption risks in 
the event of a power failure.

It's also likely that as the actual number of bugs go down as they are 
beginning to now, and the devs focus more on performance tuning, that 
this will get better.

Other than that, and of course the hardware/ssd option (I'm using btrfs 
in btrfs raid1 mode on a pair of ssds here and the zero-seek-time DOES 
make a difference, but I'm not doing terabytes of data either; that's 
still on reiserfs on spinning rust, here), it may simply be that btrfs 
isn't a filesystem choice well matched to your needs.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  reply	other threads:[~2013-07-22 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22  5:22 abysmal rm performance? Tomasz Chmielewski
2013-07-22 10:39 ` Duncan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-07-20  5:37 Tomasz Chmielewski
2013-07-20 12:54 ` Duncan
2013-07-20 13:36   ` Clemens Eisserer

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='pan$e8fb1$a4cde2ce$20a617b6$10f5d98a@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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;
as well as URLs for NNTP newsgroup(s).