linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, zhangjiachen.jaycee@bytedance.com
Subject: [PATCH] fuse: increase FUSE_MAX_MAX_PAGES limit
Date: Wed, 24 Jan 2024 15:05:12 +0800	[thread overview]
Message-ID: <20240124070512.52207-1-jefflexu@linux.alibaba.com> (raw)

From: Xu Ji <laoji.jx@alibaba-inc.com>

Increase FUSE_MAX_MAX_PAGES limit, so that the maximum data size of a
single request is increased.

This optimizes the write performance especially when the optimal IO size
of the backend store at the fuse daemon side is greater than the original
maximum request size (i.e. 1MB with 256 FUSE_MAX_MAX_PAGES and
4096 PAGE_SIZE).

Be noted that this only increases the upper limit of the maximum request
size, while the real maximum request size relies on the FUSE_INIT
negotiation with the fuse daemon.

Signed-off-by: Xu Ji <laoji.jx@alibaba-inc.com>
Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
---
I'm not sure if 1024 is adequate for FUSE_MAX_MAX_PAGES, as the
Bytedance floks seems to had increased the maximum request size to 8M
and saw a ~20% performance boost.
---
 fs/fuse/fuse_i.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 1df83eebda92..6bd2cf0b42e1 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -36,7 +36,7 @@
 #define FUSE_DEFAULT_MAX_PAGES_PER_REQ 32
 
 /** Maximum of max_pages received in init_out */
-#define FUSE_MAX_MAX_PAGES 256
+#define FUSE_MAX_MAX_PAGES 1024
 
 /** Bias for fi->writectr, meaning new writepages must not be sent */
 #define FUSE_NOWRITE INT_MIN
-- 
2.19.1.6.gb485710b


             reply	other threads:[~2024-01-24  7:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24  7:05 Jingbo Xu [this message]
2024-01-24 12:23 ` [PATCH] fuse: increase FUSE_MAX_MAX_PAGES limit Miklos Szeredi
2024-01-24 12:47   ` Jingbo Xu
2024-01-26  6:29     ` Jingbo Xu
2024-02-26  4:00       ` Jingbo Xu
2024-03-05 14:26         ` Miklos Szeredi
2024-03-06 13:32           ` Jingbo Xu
2024-03-06 15:45             ` Bernd Schubert
2024-03-07  2:16               ` Jingbo Xu
2024-03-07 22:06                 ` Bernd Schubert
2024-03-28 16:46                   ` Sweet Tea Dorminy
2024-03-28 22:08                     ` Bernd Schubert
  -- strict thread matches above, loose matches on Subject: below --
2024-04-08  6:32 Sweet Tea Dorminy
2024-04-08 14:26 ` Antonio SJ Musumeci

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240124070512.52207-1-jefflexu@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=zhangjiachen.jaycee@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).