Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Hard drive hangs after excessive I/O
Date: Fri, 21 Feb 2014 16:09:56 +0000 (UTC)	[thread overview]
Message-ID: <pan$9db86$8cb7b8f1$9ed699ad$9da2e024@cox.net> (raw)
In-Reply-To: CAAVQaYCkxpp8vX8PnO3OLffSm_MMCt6N2qFT=5DWjseZmZ1xbA@mail.gmail.com

Dave posted on Fri, 21 Feb 2014 10:21:38 -0500 as excerpted:

> During this time, all IO totally freezes.  Atop reports no disk
> activity, while my desktop is totally hung.  After a few minutes
> everything comes back to life, only to freeze again after a few more
> minutes.
> 
> A reboot clears everything up for a day or so but the problem invariably
> comes back.  Can anybody shed some light on this?
> 
> PS, the above qemu process is accessing image files on a btrfs volume.
>  These files were created as such:
> touch winxp.img
> chattr +C winxp.img
> fallocate -l20G winxp.img

That procedure should indeed make those VM images properly NOCOW.
Thanks for being so explicit. =:^)

One other question:  Are you, or perhaps your distro via likely automated 
script, doing any btrfs snapshotting of the VM-image containing btrfs 
(sub)volume?

Because snapshotting on a an actively being rewritten NOCOW file is one 
known exception to that NOCOW.  The snapshot takes a copy of the file at 
that moment, and further writes to it must therefore be COWed -- tho only 
the first time a block is written to after the snapshot, further writes 
to the same block will remain in-place written until the next snapshot 
freezes that in-place, triggering yet another COW on first write once 
again.

So depending on the presumably scripted snapshotting schedule and the 
activity on the VM, fragmentation probably won't be as bad on a 
snapshotted NOCOW image as on a standard COW image, but it will still 
happen.

So if you have a snapshotting script running on that subvolume, that 
might be /part/ of it, tho to my knowledge that doesn't fully explain why 
it'd be better for a day or so after a reboot, since the fragmentation 
should be the same as before the reboot.

If you're not doing snapshotting, given that the VMs should indeed be 
NOCOW and as posted you've handled that correctly, I've no idea.  But 
I'll certainly be following the thread, as this is one aspect I've been 
particularly interested in. I don't have any specific personal 
involvement in it at this point, but it's a general enough problem I very 
well could in the future.

-- 
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:[~2014-02-21 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 15:21 Hard drive hangs after excessive I/O Dave
2014-02-21 16:09 ` Duncan [this message]
2014-02-21 17:16   ` Dave
2014-02-21 17:59     ` Chris Murphy
2014-02-21 19:27       ` Dave
2014-02-22  2:43         ` Chris Murphy

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$9db86$8cb7b8f1$9ed699ad$9da2e024@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