Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1375568 > unrolled thread

Re: [fuse-devel] Horrible mmap write performance (kernel writeback issue?)

Started byJakob Unterwurzacher <jakobunt@gmail.com>
First post2016-04-11 10:10 +0200
Last post2016-04-13 09:30 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [fuse-devel] Horrible mmap write performance (kernel writeback  issue?) Jakob Unterwurzacher <jakobunt@gmail.com> - 2016-04-11 10:10 +0200
    Re: [fuse-devel] Horrible mmap write performance (kernel writeback  issue?) Tejun Heo <tj@kernel.org> - 2016-04-12 02:30 +0200
      Re: [fuse-devel] Horrible mmap write performance (kernel writeback issue?) Ashish Sangwan <ashishsangwan2@gmail.com> - 2016-04-12 11:30 +0200
        Re: [fuse-devel] Horrible mmap write performance (kernel writeback  issue?) Tejun Heo <tj@kernel.org> - 2016-04-12 13:10 +0200
          Re: [fuse-devel] Horrible mmap write performance (kernel writeback issue?) Sedat Dilek <sedat.dilek@gmail.com> - 2016-04-13 09:30 +0200

#1375568 — Re: [fuse-devel] Horrible mmap write performance (kernel writeback issue?)

FromJakob Unterwurzacher <jakobunt@gmail.com>
Date2016-04-11 10:10 +0200
SubjectRe: [fuse-devel] Horrible mmap write performance (kernel writeback issue?)
Message-ID<rmF51-2CR-25@gated-at.bofh.it>
On 30.03.2016 20:47, Tejun Heo wrote:
> Hmmm... cgroup writeback support shouldn't affect fuse at all as the
> backing device doesn't enable cgroup support.  I probably made some
> silly mistake.  Is there a simple reproducer I can play with?

Hi Tejun! A simple reproducer is at https://github.com/rfjakob/mmapwrite .

What seems to be happening in the kernel is that the estimated device bandwith
drops to zero. I'm not even sure how this works for FUSE, but that's what I
gathered from some printk debugging.

What I also found is that once mmapwrite is hung, you can unblock it for some
time by running something like

    cat /dev/zero > /var/tmp/foo

mmapwrite will then steam ahead as long as cat is writing, even though encfs
writes to /tmp (tmpfs) and /var is on the ext4 disk.

Note that the hang happens regardless of the backing device, on both tmpfs and
ext4.

Best regards,
Jakob

[toc] | [next] | [standalone]


#1376358

FromTejun Heo <tj@kernel.org>
Date2016-04-12 02:30 +0200
Message-ID<rmUno-6qa-3@gated-at.bofh.it>
In reply to#1375568
Hello,

On Mon, Apr 11, 2016 at 10:04:42AM +0200, Jakob Unterwurzacher wrote:
> What seems to be happening in the kernel is that the estimated device bandwith
> drops to zero. I'm not even sure how this works for FUSE, but that's what I
> gathered from some printk debugging.

Yeah, writeback bw getting messed up is the most likely cause.  Prolly
some silly bug.  I can reproduce the problem.  Looking into it.

Thanks.

-- 
tejun

[toc] | [prev] | [next] | [standalone]


#1376586 — Re: [fuse-devel] Horrible mmap write performance (kernel writeback issue?)

FromAshish Sangwan <ashishsangwan2@gmail.com>
Date2016-04-12 11:30 +0200
SubjectRe: [fuse-devel] Horrible mmap write performance (kernel writeback issue?)
Message-ID<rn2NX-4Qf-5@gated-at.bofh.it>
In reply to#1376358
On Tue, Apr 12, 2016 at 5:54 AM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Mon, Apr 11, 2016 at 10:04:42AM +0200, Jakob Unterwurzacher wrote:
>> What seems to be happening in the kernel is that the estimated device bandwith
>> drops to zero. I'm not even sure how this works for FUSE, but that's what I
>> gathered from some printk debugging.
>
> Yeah, writeback bw getting messed up is the most likely cause.  Prolly
> some silly bug.  I can reproduce the problem.  Looking into it.

Probably you want to look into:
https://lkml.org/lkml/2016/3/10/21

The patch mentioned above solves the issue for me.

Thanks,
Ashish
>
> Thanks.
>
> --
> tejun

[toc] | [prev] | [next] | [standalone]


#1376706

FromTejun Heo <tj@kernel.org>
Date2016-04-12 13:10 +0200
Message-ID<rn4mK-6uB-19@gated-at.bofh.it>
In reply to#1376586
Hello,

On Tue, Apr 12, 2016 at 02:54:08PM +0530, Ashish Sangwan wrote:
> On Tue, Apr 12, 2016 at 5:54 AM, Tejun Heo <tj@kernel.org> wrote:
> > Hello,
> >
> > On Mon, Apr 11, 2016 at 10:04:42AM +0200, Jakob Unterwurzacher wrote:
> >> What seems to be happening in the kernel is that the estimated device bandwith
> >> drops to zero. I'm not even sure how this works for FUSE, but that's what I
> >> gathered from some printk debugging.
> >
> > Yeah, writeback bw getting messed up is the most likely cause.  Prolly
> > some silly bug.  I can reproduce the problem.  Looking into it.
> 
> Probably you want to look into:
> https://lkml.org/lkml/2016/3/10/21
> 
> The patch mentioned above solves the issue for me.

Heh, I tracked it down to wb_over_bg_thresh() and fell asleep.  Yeah,
that is the right fix.

Thanks.

-- 
tejun

[toc] | [prev] | [next] | [standalone]


#1377582 — Re: [fuse-devel] Horrible mmap write performance (kernel writeback issue?)

FromSedat Dilek <sedat.dilek@gmail.com>
Date2016-04-13 09:30 +0200
SubjectRe: [fuse-devel] Horrible mmap write performance (kernel writeback issue?)
Message-ID<rnnpo-5TB-3@gated-at.bofh.it>
In reply to#1376706
On Tue, Apr 12, 2016 at 1:09 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> On Tue, Apr 12, 2016 at 02:54:08PM +0530, Ashish Sangwan wrote:
>> On Tue, Apr 12, 2016 at 5:54 AM, Tejun Heo <tj@kernel.org> wrote:
>> > Hello,
>> >
>> > On Mon, Apr 11, 2016 at 10:04:42AM +0200, Jakob Unterwurzacher wrote:
>> >> What seems to be happening in the kernel is that the estimated device bandwith
>> >> drops to zero. I'm not even sure how this works for FUSE, but that's what I
>> >> gathered from some printk debugging.
>> >
>> > Yeah, writeback bw getting messed up is the most likely cause.  Prolly
>> > some silly bug.  I can reproduce the problem.  Looking into it.
>>
>> Probably you want to look into:
>> https://lkml.org/lkml/2016/3/10/21
>>
>> The patch mentioned above solves the issue for me.
>
> Heh, I tracked it down to wb_over_bg_thresh() and fell asleep.  Yeah,
> that is the right fix.
>

Feel free to add my...

     Tested-by: Sedat Dilek <sedat.dilek@gmail.com>

Patch available from [1].

- sed@ -

[1] https://patchwork.kernel.org/patch/8554181/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web