linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: "cheater00 ." <cheater00@gmail.com>, Liu Bo <bo.li.liu@oracle.com>
Cc: Henk Slager <hslager@hotmail.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Bad fs performance, IO freezes
Date: Thu, 29 Oct 2015 10:00:25 -0400	[thread overview]
Message-ID: <56322679.8050001@gmail.com> (raw)
In-Reply-To: <CA+9GZUhKmH9x_D6r=P8p=E4H38t+jcUQd1bFeVeE_uj1GyTA8A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2955 bytes --]

On 2015-10-29 09:03, cheater00 . wrote:
> Hi Liu,
> after talking with Holger I believe turning off COW on this FS will
> work to alleviate this issue. However, even with COW on, btrfs
> shouldn't be making my computer freeze every 5 seconds... especially
> while the disk is written to at mere tens of kilobytes per second.
> It's not even the disk holding the system. I consider this a pretty
> bad bug... should we go on with trying to reproduce a minimum case?
> How would I go about this?

Well, COW can cause some pretty unexpected behavior for some use cases. 
  If you have a big disk (I think I remember you saying it was larger 
than 1TB), then COW can cause some pretty significant seek times because 
of how it works.  With the current state of BTRFS, I wouldn't personally 
consider running BTRFS on anything bigger than 256G with a non-zero seek 
time with COW turned on, because large rewrites would have the potential 
to cause horrifically long seek times just for a RMW cycle on a single 
block, and this is in turn part of why database files and 
virtual-machine images tend to be pathological use cases for BTRFS.

I do agree that this kind of thing is a bug, but it's not something that 
causes data corruption, which means that it is slightly lower priority 
as far as most people are concerned.  Reproducing it might be tricky 
also, because I'd be willing to bet that things get better to the point 
of it being almost unnoticeable with an internal disk (USB is horrible 
when it comes to block storage performance, and has all kinds of 
potential reliability issues).

Normally, when I try to go about reproducing something like this, I use 
a virtual machine running the most recent stable version of the Linux 
kernel, usually with a minimalistic Gentoo installation (although a 
clean install of pretty much any distro works fine).  There are a couple 
of reasons I use such a setup:
1. Using a clean install provides a well defined initial state, making 
it easier for other people to reproduce any results.
2. Using the most recent stable kernel available (usually) eliminates 
the chances of old bugs causing issues.
3. Using a VM means that your disk access will be slower, which will 
visibly accentuate any kind of performance issues.
4. Using a VM also means that it is very easy to safely generate crash 
dumps and simulate data corruption for testing purposes, and makes it 
easier to experiment with different parameters (for example, UP versus 
SMP, or different amounts of RAM).

If you do decide to go this route, my suggestion would be to use 
VirtualBox unless you have significant experience with some other 
hypervisor, as it's one of the easiest to learn to use (I usually use 
Xen or QEMU, but both require significant effort to set up initially, 
and are decidedly non-trivial to learn), and learning to debug stuff 
like this is itself not an easy task.


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

  reply	other threads:[~2015-10-29 14:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 12:16 Bad fs performance, IO freezes cheater00 .
2015-10-26 13:32 ` Donald Pearson
2015-10-26 13:36   ` cheater00 .
2015-10-26 13:45     ` Donald Pearson
2015-10-26 13:46       ` cheater00 .
2015-10-26 13:56         ` cheater00 .
2015-10-26 14:00           ` Donald Pearson
2015-10-26 14:25 ` Liu Bo
2015-10-26 14:38   ` cheater00 .
2015-10-26 15:40     ` cheater00 .
2015-10-26 17:43       ` cheater00 .
2015-10-26 18:31         ` cheater00 .
2015-10-27  2:00           ` cheater00 .
2015-10-27  6:39             ` Duncan
2015-10-27  8:55               ` cheater00 .
2015-10-27 11:44             ` Austin S Hemmelgarn
2015-10-27 13:00               ` Henk Slager
2015-10-27 13:30                 ` Austin S Hemmelgarn
2015-10-27 14:22                   ` cheater00 .
2015-10-27 14:26                     ` cheater00 .
2015-10-27 14:30                       ` cheater00 .
2015-10-27 14:43                         ` cheater00 .
2015-10-27 15:01                           ` Holger Hoffstätte
2015-10-27 15:05                             ` cheater00 .
2015-10-27 15:07                               ` cheater00 .
2015-10-27 15:22                                 ` Holger Hoffstätte
2015-10-27 15:26                           ` Austin S Hemmelgarn
2015-10-29 13:03                             ` cheater00 .
2015-10-29 14:00                               ` Austin S Hemmelgarn [this message]
2015-10-29 15:49                                 ` cheater00 .
2015-10-29 18:49                                   ` Henk Slager
2015-10-29 20:01                                   ` Austin S Hemmelgarn
2015-11-06 13:37                                     ` cheater00 .

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=56322679.8050001@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=bo.li.liu@oracle.com \
    --cc=cheater00@gmail.com \
    --cc=hslager@hotmail.com \
    --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).