* fixing slow sync(2)
@ 2011-10-08 15:24 Tomas Carnecky
2011-10-08 15:35 ` Josef Bacik
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Carnecky @ 2011-10-08 15:24 UTC (permalink / raw)
To: linux-btrfs
The issue with sync(2) being slow has been known for a while now (I can
find discussions as early as July 2010). But nobody seems to be willing
to fix it or even figure out out what the actual problem is. I use btrfs
on two hosts, and the sync(2) syscall is consistently slow. By slow I
mean 20 seconds on one and 45(!) seconds on the other. Every single
time, no exceptions.
Is there anything I can do to help track down the cause? I can test
patches, trace the kernel or use whatever tool is most helpful.
tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fixing slow sync(2)
2011-10-08 15:24 fixing slow sync(2) Tomas Carnecky
@ 2011-10-08 15:35 ` Josef Bacik
[not found] ` <CAE=-PDhvddavk9DyyF07gi0uq=a+WfGbXN89r28SRK9SYPaZfA@mail.gmail.com>
2011-10-12 18:36 ` Dan Merillat
0 siblings, 2 replies; 5+ messages in thread
From: Josef Bacik @ 2011-10-08 15:35 UTC (permalink / raw)
To: Tomas Carnecky; +Cc: linux-btrfs
On Sat, Oct 08, 2011 at 05:24:15PM +0200, Tomas Carnecky wrote:
> The issue with sync(2) being slow has been known for a while now (I can
> find discussions as early as July 2010). But nobody seems to be willing
> to fix it or even figure out out what the actual problem is. I use btrfs
> on two hosts, and the sync(2) syscall is consistently slow. By slow I
> mean 20 seconds on one and 45(!) seconds on the other. Every single
> time, no exceptions.
>
> Is there anything I can do to help track down the cause? I can test
> patches, trace the kernel or use whatever tool is most helpful.
>
I think I fixed this, try my git tree
git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work.git
Let me know if it helps. And what are you doing when you call sync? I've not
been able to reproduce this problem so I'm having a hard time nailing down what
it is, so if I can get a reliable way to reproduce it I'll try and figure it
out. Thanks,
Josef
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <CAE=-PDhvddavk9DyyF07gi0uq=a+WfGbXN89r28SRK9SYPaZfA@mail.gmail.com>]
* Re: fixing slow sync(2)
[not found] ` <CAE=-PDhvddavk9DyyF07gi0uq=a+WfGbXN89r28SRK9SYPaZfA@mail.gmail.com>
@ 2011-10-11 3:11 ` John
2011-10-11 13:38 ` Josef Bacik
1 sibling, 0 replies; 5+ messages in thread
From: John @ 2011-10-11 3:11 UTC (permalink / raw)
To: linux-btrfs
Resending as plain text.
---------- Forwarded message ----------
=46rom: John <jello@waste.org>
Date: Mon, Oct 10, 2011 at 9:34 PM
Subject: Re: fixing slow sync(2)
To: Josef Bacik <josef@redhat.com>
Cc: Tomas Carnecky <tom@dbservice.com>, linux-btrfs@vger.kernel.org
On Sat, Oct 8, 2011 at 10:35 AM, Josef Bacik <josef@redhat.com> wrote:
>
> I think I fixed this, try my git tree
>
> git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work.git
>
> Let me know if it helps. =A0And what are you doing when you call sync=
? =A0I've not
> been able to reproduce this problem so I'm having a hard time nailing=
down what
> it is, so if I can get a reliable way to reproduce it I'll try and fi=
gure it
> out. =A0Thanks,
I've been seeing very slow syncs (and unmounts) and this helps. Under
3.0.0 if I mounted the FS (which is 200G, about 97G used with ~720
snapshots) it took about 3 minutes 40 seconds. If I did another sync
right away it took the same amount of time. With a kernel compiled
from your repo the first time I sync it takes about 1 minute, as soon
as I sync a=A0btrfs-endio-met and=A0btrfs-cache-0 process show up in to=
p
and a lot of IO happens. Once those go away (which takes a couple
minutes) then it takes well under a second. If I unmount and remount
it acts exactly the same. Will those changes be up in 3.1 or 3.2? If
you want me to test anything else, I'm happy to do so.
Thanks much.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: fixing slow sync(2)
[not found] ` <CAE=-PDhvddavk9DyyF07gi0uq=a+WfGbXN89r28SRK9SYPaZfA@mail.gmail.com>
2011-10-11 3:11 ` John
@ 2011-10-11 13:38 ` Josef Bacik
1 sibling, 0 replies; 5+ messages in thread
From: Josef Bacik @ 2011-10-11 13:38 UTC (permalink / raw)
To: John; +Cc: Josef Bacik, Tomas Carnecky, linux-btrfs
On Mon, Oct 10, 2011 at 09:34:12PM -0500, John wrote:
> On Sat, Oct 8, 2011 at 10:35 AM, Josef Bacik <josef@redhat.com> wrote:
>
> >
> > I think I fixed this, try my git tree
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work.git
> >
> > Let me know if it helps. And what are you doing when you call sync? I've
> > not
> > been able to reproduce this problem so I'm having a hard time nailing down
> > what
> > it is, so if I can get a reliable way to reproduce it I'll try and figure
> > it
> > out. Thanks,
> >
>
> I've been seeing very slow syncs (and unmounts) and this helps. Under 3.0.0
> if I mounted the FS (which is 200G, about 97G used with ~720 snapshots) it
> took about 3 minutes 40 seconds. If I did another sync right away it took
> the same amount of time. With a kernel compiled from your repo the first
> time I sync it takes about 1 minute, as soon as I sync a btrfs-endio-met
> and btrfs-cache-0 process show up in top and a lot of IO happens. Once those
> go away (which takes a couple minutes) then it takes well under a second. If
> I unmount and remount it acts exactly the same. Will those changes be up in
> 3.1 or 3.2? If you want me to test anything else, I'm happy to do so.
>
They'll show up in 3.2. Thanks for testing,
Josef
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fixing slow sync(2)
2011-10-08 15:35 ` Josef Bacik
[not found] ` <CAE=-PDhvddavk9DyyF07gi0uq=a+WfGbXN89r28SRK9SYPaZfA@mail.gmail.com>
@ 2011-10-12 18:36 ` Dan Merillat
1 sibling, 0 replies; 5+ messages in thread
From: Dan Merillat @ 2011-10-12 18:36 UTC (permalink / raw)
To: Josef Bacik; +Cc: Tomas Carnecky, linux-btrfs
On Sat, Oct 8, 2011 at 11:35 AM, Josef Bacik <josef@redhat.com> wrote:
> I think I fixed this, try my git tree
>
> git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work.git
I wanted to Ack this as well - 3.1-rc4 was completely unusable when
firefox was running (30+ second pauses to read directories, btrfs
threads were constantly running, even the mouse was jerky due to the
load)
Built from your tree (fa5cf66) and everything works like it should
again. No load, fast response to IO requests.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-12 18:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-08 15:24 fixing slow sync(2) Tomas Carnecky
2011-10-08 15:35 ` Josef Bacik
[not found] ` <CAE=-PDhvddavk9DyyF07gi0uq=a+WfGbXN89r28SRK9SYPaZfA@mail.gmail.com>
2011-10-11 3:11 ` John
2011-10-11 13:38 ` Josef Bacik
2011-10-12 18:36 ` Dan Merillat
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.