From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f53.google.com ([209.85.218.53]:36419 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728875AbeHIJh6 (ORCPT ); Thu, 9 Aug 2018 05:37:58 -0400 Received: by mail-oi0-f53.google.com with SMTP id n21-v6so8194242oig.3 for ; Thu, 09 Aug 2018 00:14:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Miklos Szeredi Date: Thu, 9 Aug 2018 09:14:28 +0200 Message-ID: Subject: Re: FUSE: write operations trigger balance_dirty_pages when using writeback cache To: =?UTF-8?B?5YiY56GV54S2?= Cc: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Aug 9, 2018 at 5:37 AM, =E5=88=98=E7=A1=95=E7=84=B6 wrote: > Dear Miklos, > > Recently I've been testing FUSE and libfuse example passthrough_ll with w= riteback cache on, and found out that the performance drops significantly c= ompared to that in local filesystem. As I can see from trace, balance_dirty= _pages is triggered very frequently even if there not enough pages that sha= ll be sent to libfuse. I'm not sure if this is a known fact or the FUSE wri= teback feature requires some specific configurations. Trace log is attached= . > > dd-19067 [001] .... 195295.568097: balance_dirty_pages: bdi 0:42: limit= =3D3180390 setpoint=3D2782421 dirty=3D5 bdi_setpoint=3D0 bdi_dirty=3D32 dir= ty_ratelimit=3D32 task_ratelimit=3D0 dirtied=3D32 dirtied_pause=3D32 paused= =3D0 pause=3D33 period=3D33 think=3D0 cgroup_ino=3D1 > dd-19067 [001] .... 195295.602029: balance_dirty_pages: bdi 0:42: limit= =3D3180390 setpoint=3D2782421 dirty=3D5 bdi_setpoint=3D0 bdi_dirty=3D33 dir= ty_ratelimit=3D32 task_ratelimit=3D0 dirtied=3D1 dirtied_pause=3D0 paused= =3D0 pause=3D34 period=3D34 think=3D1 cgroup_ino=3D1 > dd-19067 [001] .... 195295.637026: balance_dirty_pages: bdi 0:42: limit= =3D3180390 setpoint=3D2782421 dirty=3D5 bdi_setpoint=3D0 bdi_dirty=3D34 dir= ty_ratelimit=3D32 task_ratelimit=3D0 dirtied=3D1 dirtied_pause=3D0 paused= =3D0 pause=3D35 period=3D35 think=3D1 cgroup_ino=3D1 > > BTW, I'm using Linux kernel 4.17.12 and libfuse 3.2.5. Look forward to he= aring from you. Thanks in advance. Try echo 20 > /sys/devices/virtual/bdi/0:`stat -c %d /mnt/fuse/`/max_ratio where you replace /mnt/fuse with your mountpoint. Thanks, Miklos