Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1095850rdb; Wed, 24 Jan 2024 04:59:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrbyipt6TGVyTKXDbCGkgB+7LI7c0qAQjP41rwKo+ox8chHHuOxMmCXX46MjBaZ3TrXvQ1 X-Received: by 2002:aa7:9848:0:b0:6db:cdba:be9c with SMTP id n8-20020aa79848000000b006dbcdbabe9cmr3474440pfq.54.1706101153380; Wed, 24 Jan 2024 04:59:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706101153; cv=pass; d=google.com; s=arc-20160816; b=ysAGQa1HmsEfdARoh8EXXXrUAMZGYYQSUk9MtTYyiWG/UfNx9Gf0BOfGtMnk5eYVbl bTxyh9SeOglERgOyvRRdh9EhUZTWQJMgJL0ewlz7dfucoAzqw+dsZ8zOxm8xoNdtXVph 5FI0OMFBS3vuRZ2UAoN6ankErgkttSt6DfZ+WIa4URF/jjLzWOJsr4NA+emgmJuDSvbR Sh+wQb5KRu85decRlhWtP0xGq6OMi0iOmzGc1o4mAOkgYOoS9qaB6+UYOCHtqUUHuYIW uWvDqTLHZvZ3eeOz/k4UfmCRNQoWqgQqAdY1BYrS1G5sg9gmFgv/CYaUTerX9KDcSy/q xDTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=GKtF7BKRegr6U5jr0Fa+NwHLvXsqZmVEHtW/HHHePkg=; fh=703EK4fsgijzdjx1LAFFSrw4SX7taPT7rj2kur7h6dQ=; b=N0zD6lC1F+QvA/7CARHa665xSaHg4I0ekSNJqxc5qhLdz+FXbpV7FQFp3OqjIfdKPI XodyKPhiyw9caWYO072z0iFNe4fKdWwakd0WUlPVcG5e3RlXqXWGWOiOKGfg55F/h4LQ owKq4eVDXs+PxcZp8Hvri3EhuswGzWjTt0bKmePERMDX+4MvksEJGWugrDgmahz4Xb9r Z3HybW+KtHrtCXujj+VpMvir6J/8yuxCTZigbpcox1hMrkQDFp7izX/+kC3jDCqfCFEd Sn54MXtmioBuF3KdUukrCwze/CXYwoaekcmybRNxso+mbjJ759Mf2OfCuHp321MufEYo 5gHg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-37018-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37018-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u15-20020a056a00098f00b006dd866c4ab0si1772504pfg.136.2024.01.24.04.59.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 04:59:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37018-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-37018-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37018-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CB6AB29163B for ; Wed, 24 Jan 2024 12:48:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26BFB7764B; Wed, 24 Jan 2024 12:47:57 +0000 (UTC) Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91AC876918; Wed, 24 Jan 2024 12:47:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706100476; cv=none; b=GXTq6axMUMLRWbfnapnLDJpe0pvsZZ3yfpZcejTj3Gff0Qx6KFWUh5SHlM3zxwv193kpuP/5AGl9ulJ4duroVM0OJGeAvfJwptUDKsksbFsF628Tb6tkftZppu5meUGlwEA6iiKf7RWjde3X9wEO1rAp53JZCo6Jukb/RCwF+ZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706100476; c=relaxed/simple; bh=t7Xd3wxMZ8SnVi93CphbSDGFf7zPs+X1p9aSe+xXTn0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=StT0qqG/DU8lO65FwGvvDNd9tydPCsF9xzXHkL0bLdfJLK9Eglk1T+aDKzsTSLyq4KIHqI8UETVuLutP7UUIk2DqCyBV5Nvbf1NSS2rBlRAf5enhbs5lrxcGEKo0IULCvVsoJDRRJM0nmdw0Ivv8VN1GNjiGxYrpsNibN0Nkwgw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; arc=none smtp.client-ip=115.124.30.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0W.GpQgu_1706100464; Received: from 192.168.31.58(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0W.GpQgu_1706100464) by smtp.aliyun-inc.com; Wed, 24 Jan 2024 20:47:45 +0800 Message-ID: <6e6bef3d-dd26-45ce-bc4a-c04a960dfb9c@linux.alibaba.com> Date: Wed, 24 Jan 2024 20:47:44 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] fuse: increase FUSE_MAX_MAX_PAGES limit Content-Language: en-US To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, zhangjiachen.jaycee@bytedance.com References: <20240124070512.52207-1-jefflexu@linux.alibaba.com> From: Jingbo Xu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/24/24 8:23 PM, Miklos Szeredi wrote: > On Wed, 24 Jan 2024 at 08:05, Jingbo Xu wrote: >> >> From: Xu Ji >> >> Increase FUSE_MAX_MAX_PAGES limit, so that the maximum data size of a >> single request is increased. > > The only worry is about where this memory is getting accounted to. > This needs to be thought through, since the we are increasing the > possible memory that an unprivileged user is allowed to pin. OK that will be an issue. > > > >> >> 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 >> Signed-off-by: Jingbo Xu >> --- >> 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. > > The 20% is against the 256 pages, I guess. Yeah I guess so. > It would be interesting to > see the how the number of pages per request affects performance and > why. To be honest, I'm not sure the root cause of the performance boost in bytedance's case. While in our internal use scenario, the optimal IO size of the backend store at the fuse server side is, e.g. 4MB, and thus if the maximum throughput can not be achieved with current 256 pages per request. IOW the backend store, e.g. a distributed parallel filesystem, get optimal performance when the data is aligned at 4MB boundary. I can ask my folk who implements the fuse server to give more background info and the exact performance statistics. Thanks. -- Thanks, Jingbo