Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1712587imm; Thu, 9 Aug 2018 00:16:56 -0700 (PDT) X-Google-Smtp-Source: AA+uWPydhiq9qV0GVqPtyN40EWkKASxfyWfq9oEM7Ur86Lnr8dBTzh8HEIsl4OLkXhrccEQukReZ X-Received: by 2002:a17:902:a987:: with SMTP id bh7-v6mr1009666plb.182.1533799016246; Thu, 09 Aug 2018 00:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533799016; cv=none; d=google.com; s=arc-20160816; b=EE3AzP3JSztquISL8R4MXPJqB0yu7FVjHToPqwV3wTQTXi4VdYl8QbOv/8IsqqXXdk 8L7wGihmwJV5+5ENc0flkf0CcFOVsihHRjy4bQfsM7/k1g+DtNejGtHUdpzJ0K1qjxGR +iXpyI6lXIAPfMLP0jj+Xx7vUtDWO9ywCNYjtWHxwG3SP6WnuPwMq2L5t1kYs3NocLn8 R0TUhcz6pLTaelQLjE6oBNnTYJKNw7AOhUXYFlEimQQyhE6tOBVbc/+SLpfYCCqp49nd Q+u3rs+K/agv3CYSrohdJKPtjM6dBDK9XVkY42zpoTzZ5KdMjHy5nGVK0DlKmnDeKwRB hyhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=Q6nsvPMdwQ/LSeTS0u/S8l9EgKiy8KAK+80Arhi3a1c=; b=Xml09LmStd95IyN8byRYs0Gfe9ybPxGkwQH9nQ3y2BbsyOwPL48y+P3mlbP27/aaOX dFU17HDhZAQd3bKSq53CDKN9l1AInnc+vf5mil/0jqzGpclatY2vGq4Oiw/WMT7FZ3AN ES9DdPnauSwKfUFTowYhcnZpF7+rzxcRvVhAfmGkdssUPQQ8FlNwe9xuM+xCfX4OFtqc IuleWclfOLge0XBv6fJyOz9XoTYOQNLP7c00GUovPk5cKJm3DSN38o7K7/JS1cnxiuUH 642kWARIHu5PnDSMhekqVrdz6+7+r/SwPT14vAsUcszdnPXJbRm2pDQ790HeT1FtZQ5j AUTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=LHdbWUHR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n72-v6si6674534pfk.14.2018.08.09.00.16.41; Thu, 09 Aug 2018 00:16:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=LHdbWUHR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729336AbeHIJh6 (ORCPT + 99 others); Thu, 9 Aug 2018 05:37:58 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:33102 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728056AbeHIJh6 (ORCPT ); Thu, 9 Aug 2018 05:37:58 -0400 Received: by mail-oi0-f47.google.com with SMTP id 8-v6so8228271oip.0 for ; Thu, 09 Aug 2018 00:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Q6nsvPMdwQ/LSeTS0u/S8l9EgKiy8KAK+80Arhi3a1c=; b=LHdbWUHRqw1vTa5y+Hg1KEobBLNNun5kSDwvrV5iDHpxVeeb101GaBIe4kXMz1yO3r Q6jZqhMZ1jNNv7aFMkTbX+JPdUKfEcT7Oif2dH6X5/DucE9n1XwXBi+bbCW6A8TUdSiT uLj66E4f21fAjoYYDwOneGLv7jOJkJFg6qclI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Q6nsvPMdwQ/LSeTS0u/S8l9EgKiy8KAK+80Arhi3a1c=; b=gUYZsrRmfzjHWrNY2KX4hilNl+IcRybPRvPle/Nu1siDXBf/wC1ZGy8Etp8oFZ8UJY qsqNpREARswfnPIgUW3jTXsmIvcjhFH5G+STogA6NLnl0kvmoZYh3YwJCSvdQP/eeura us5Yt4iHxZO877eLpqUdWnb3Mdzn3YxSq+HOHxxjEcdXzKjjbg/9fbtjjRq4H9gYEod3 2D6+QaIQRf4JaKLbaU/NCcTdzvQXGeEFAvjFWyQYqVi/zUZzC/5CEj+ua+Nx3roqOtP5 eO+2agl4vJlcyLEGSamvnHENbWq+Tc1r51+xaG6FTio986BOtgDM9vpeQIibaG+11UZG 7Ggw== X-Gm-Message-State: AOUpUlFInPyPJbCVkIq+cduF0wYg+nRPXb4YxTylKNj7MGvxLz1/5jRH UPYRJGUvxRBtIjqGuJcmpZAYy3nqlWHy2jnqhPy4Qg== X-Received: by 2002:aca:4bc6:: with SMTP id y189-v6mr934648oia.181.1533798869048; Thu, 09 Aug 2018 00:14:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:113c:0:0:0:0:0 with HTTP; Thu, 9 Aug 2018 00:14:28 -0700 (PDT) X-Originating-IP: [212.96.48.140] 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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