linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Applications using fsync cause hangs for several seconds every few minutes
@ 2011-06-21 11:15 Jan Stilow
  0 siblings, 0 replies; 24+ messages in thread
From: Jan Stilow @ 2011-06-21 11:15 UTC (permalink / raw)
  To: linux-btrfs

Hello,

Nirbheek Chauhan <nirbheek <at> gentoo.org> writes:
> However, recently, perhaps with 2.6.39, or after I quickly started
> filling up my disk again, it has become impossible for me to work for
> long periods on my machine.
>
> Every few minutes, (I guess) when applications do fsync (firefox,
> xchat, vim, etc), all applications that use fsync() hang for several
> seconds, and applications that use general IO suffer extreme
> slowdowns. iotop shows various combinations of the processes listed
> below doing writes, and the total write as 2-3MB/s.
>
> [btrfs-dealloc-]
> [btrfs-submit-0]
> [btrfs-transacti]
> [btrfs-endio-wri]
> [flush-btrfs-1]

I'm using btrfs under a 2.6.39-ARCH kernel and run into the same issue.

In my case the [btrfs-submit-0] and [btrfs-transacti] shows up in iotop
and produce 99% of IO at the time a application is frozen. For something
like 10 to 30 seconds.

After a fresh boot everything runs quiet acceptable and goes worse over
the day. If I reboot the unmount process takes a lot of time something
up to 8 minutes. After the reboot everything is back to normal. At least
for a while.

I use snapshots on a daily base and have 20 active snapshots all the
time. Maybe this is the reason for the performance impact?

> What can I do to debug this issue? What other information should I
> supply? Could someone guide me on how to figure out why my machine is
> unusable now?

I have no solution for this problem. In fact a reboot helps me even if
only temporary. I also changed the IO scheduler, switched to laptop mode
and remounted the device. Neither of these helped.

Maybe someone else has any suggestion?

Thanks.

Jan Stilow

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: Applications using fsync cause hangs for several seconds every few minutes
@ 2011-08-09 21:29 Andrew Guertin
  2011-08-12  1:13 ` Andrew Guertin
  2011-08-17 14:24 ` Andrew Guertin
  0 siblings, 2 replies; 24+ messages in thread
From: Andrew Guertin @ 2011-08-09 21:29 UTC (permalink / raw)
  To: linux-btrfs

On 06/21/2011 01:15 PM, Jan Stilow wrote:
> Hello,
> 
> Nirbheek Chauhan <nirbheek <at> gentoo.org> writes:
>> [...]
>>
>> Every few minutes, (I guess) when applications do fsync (firefox,
>> xchat, vim, etc), all applications that use fsync() hang for several
>> seconds, and applications that use general IO suffer extreme
>> slowdowns. iotop shows various combinations of the processes listed
>> below doing writes, and the total write as 2-3MB/s.
>>
>> [btrfs-dealloc-]
>> [btrfs-submit-0]
>> [btrfs-transacti]
>> [btrfs-endio-wri]
>> [flush-btrfs-1]
> 
> I'm using btrfs under a 2.6.39-ARCH kernel and run into the same issue.
> 
> In my case the [btrfs-submit-0] and [btrfs-transacti] shows up in iotop
> and produce 99% of IO at the time a application is frozen. For something
> like 10 to 30 seconds.
> 
> [...]

I see the same issue. I have bisected it to

4e69b598f6cfb0940b75abf7e179d6020e94ad1e is the first bad commit
commit 4e69b598f6cfb0940b75abf7e179d6020e94ad1e
Author: Josef Bacik <josef@redhat.com>
Date:   Mon Mar 21 10:11:24 2011 -0400

Btrfs: cleanup how we setup free space clusters

...which came in between 2.6.38 and 2.6.39.

The newest kernel I have tried was 3.0-rc7, which still had the bug. I
have not tried 3.1-rc1, but plan to soon.

--Andrew

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Applications using fsync cause hangs for several seconds every few minutes
@ 2011-06-06 22:58 Nirbheek Chauhan
  2011-07-18 17:37 ` Mck
  2011-07-18 18:17 ` Josef Bacik
  0 siblings, 2 replies; 24+ messages in thread
From: Nirbheek Chauhan @ 2011-06-06 22:58 UTC (permalink / raw)
  To: linux-btrfs

Hello list,

I've been using btrfs on my personal machines for about two years now,
and on this machine for about a year with absolutely no problems.
Infact, it has held up better than ext4 with regards to reliability.

However, recently, perhaps with 2.6.39, or after I quickly started
filling up my disk again, it has become impossible for me to work for
long periods on my machine.

Every few minutes, (I guess) when applications do fsync (firefox,
xchat, vim, etc), all applications that use fsync() hang for several
seconds, and applications that use general IO suffer extreme
slowdowns. iotop shows various combinations of the processes listed
below doing writes, and the total write as 2-3MB/s.

[btrfs-dealloc-]
[btrfs-submit-0]
[btrfs-transacti]
[btrfs-endio-wri]
[flush-btrfs-1]

In some extreme cases, I've had hangs for 5 whole minutes. I'm really
beginning to appreciate how little I/O GNOME Shell does since it
remains completely responsive throughout this. I have a feeling that
the cause for this is extreme fragmentation.

My hard disk is a 500GB SATA hdd, my btrfs partition details are:

# btrfs filesystem show
Label: 'gentoo'  uuid: 6f539d7f-f70f-4216-a4a9-6f7a2117a04a
	Total devices 1 FS bytes used 246.37GB
	devid    1 size 345.13GB used 345.13GB path /dev/sda7

Btrfs v0.19-35-g1b444cd-dirty

What can I do to debug this issue? What other information should I
supply? Could someone guide me on how to figure out why my machine is
unusable now?

Thanks in advance,

-- 
~Nirbheek Chauhan

Gentoo GNOME+Mozilla Team

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2011-08-20 17:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-21 11:15 Applications using fsync cause hangs for several seconds every few minutes Jan Stilow
  -- strict thread matches above, loose matches on Subject: below --
2011-08-09 21:29 Andrew Guertin
2011-08-12  1:13 ` Andrew Guertin
2011-08-18 14:38   ` Chris Mason
2011-08-20 17:18     ` Andrew Guertin
2011-08-17 14:24 ` Andrew Guertin
2011-08-17 14:29   ` Michael Cronenworth
2011-08-17 14:38     ` Andrew Guertin
2011-08-17 14:55       ` Dave
2011-08-18  2:41         ` Anand Jain
2011-08-18  6:44           ` youagree
2011-08-18  7:29             ` Andrew Guertin
2011-08-18  7:55               ` youagree
2011-08-18 11:45               ` Andrew Guertin
2011-08-19  9:58                 ` Anand Jain
2011-08-18  7:41           ` Andrew Guertin
2011-08-18  6:47     ` Chris Samuel
2011-08-18  6:58       ` youagree
2011-08-19  7:34         ` Chris Samuel
2011-06-06 22:58 Nirbheek Chauhan
2011-07-18 17:37 ` Mck
2011-07-18 18:17 ` Josef Bacik
2011-07-20 20:59   ` Nirbheek Chauhan
2011-08-03 15:50   ` mck

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).