From patchwork Mon May 8 05:54:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 13234076 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5841AC77B75 for ; Mon, 8 May 2023 05:55:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232428AbjEHFzU (ORCPT ); Mon, 8 May 2023 01:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232478AbjEHFzO (ORCPT ); Mon, 8 May 2023 01:55:14 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 546BE19928 for ; Sun, 7 May 2023 22:54:39 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2ac7f53ae44so45416221fa.2 for ; Sun, 07 May 2023 22:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683525277; x=1686117277; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=n5Wlr942xG6CSd7qeermfDWDJpBeBmtqBNdlbqseiHQ=; b=KfOhrb6TYL5AqNyij/DNYL/LpxlnxVk79i+vGEjdNhEQAESQfmOcAhiZk+QCVv8u2v +0/gwyi6aMIct//fu2Co/wYts9SfsyssRZHKd6/H/ZwXjG2Fk0IP27R9BB+MFMtDaJNG YCXVv7iRmIRulQKiE7yApmq+rSQgq6rJ5naKCLzLDruXCVAsWMt3Qi/fpTAmYNcgq4G4 zb4D2/3qfhBVhwkD7u0HjheiiBQIygKXQkztcYU0kq31AAadPiKwtCSOomhl+htmWOCF 5RjP2OJ0DR2AOzKEBkgTb/WZ4dI0Lgwjb5QshxpNF+UJY4DjcFoBP1qx6IFoqkv6pMvq fF5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683525277; x=1686117277; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=n5Wlr942xG6CSd7qeermfDWDJpBeBmtqBNdlbqseiHQ=; b=aWPf7TyAeiNrfYPYlK7p1LM0JgrYZl2I+m4Ca9u1luzTAqOh8qknxqKI5DJ4PDaqg4 CXzK7i4REy/2/NVJpbTi/dUC5A0gvQ29jllu01lIU8ZKfef9LecOwUlNlGR75GlJTVJS EU/9ZtRO6rIkjhbMVcukHidskthycqG2KLYUUwxoSmHFRQJbF3pfzZZdEL7sdfGI0aPJ 97lMyKTrdrjRJ7R7tWw3Bp2H9JjGLbWfaF5lBYVAcmUFMTbH0tjTp9kMaqnq/hBcPWEO W8X98RaBzrblhq3m1ldBtLC6ocFXKGfnBPCgIMO5s/aUzb5zM7wgFek53AfffD3+Cqll YKLg== X-Gm-Message-State: AC+VfDzxulIGk2TcKwLEWbO8SxmYSrDVtn+d5ipvbyIND0br9dvI0qFy idUj0n+VqsxqHDx+PHmo1VHBSWXnF5jlsTEj6uCl0+5e2YIzog== X-Google-Smtp-Source: ACHHUZ6lAJT9X6v6h9G1L0ruYoBpBWFO2XSwfjKwyLwtVPbZX9IBZnfditGYvRCM4QCJactRqXDs25fOgKOO1GYa7YM= X-Received: by 2002:a2e:9c13:0:b0:2ad:814c:6ad5 with SMTP id s19-20020a2e9c13000000b002ad814c6ad5mr1296808lji.46.1683525277026; Sun, 07 May 2023 22:54:37 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Mon, 8 May 2023 00:54:25 -0500 Message-ID: Subject: [PATCH][CIFS] smb3: improve parallel reads of large files To: ronnie sahlberg , David Howells , CIFS , samba-technical Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org rasize (ra_pages) should be set higher than read size by default to allow parallel reads when reading large files in order to improve performance (otherwise there is much dead time on the network when doing readahead of large files). Default rasize to twice readsize. See attached patch This improved performance for me (although there may be cases where setting it more than 2*read_size still could help). ceph IIRC sets ra_pages even higher (to 8MB by default). Any thoughts? From 68aac85b9b697cfc1dc1286f596ebbddb9ae3c56 Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 8 May 2023 00:45:45 -0500 Subject: [PATCH] smb3: improve parallel reads of large files rasize (ra_pages) should be set higher than read size by default to allow parallel reads when reading large files in order to improve performance (otherwise there is much dead time on the network when doing readahead of large files). Default rasize to twice readsize. Signed-off-by: Steve French --- fs/cifs/cifsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 32f7c81a7b89..81430abacf93 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -246,7 +246,7 @@ cifs_read_super(struct super_block *sb) if (cifs_sb->ctx->rasize) sb->s_bdi->ra_pages = cifs_sb->ctx->rasize / PAGE_SIZE; else - sb->s_bdi->ra_pages = cifs_sb->ctx->rsize / PAGE_SIZE; + sb->s_bdi->ra_pages = 2 * (cifs_sb->ctx->rsize / PAGE_SIZE); sb->s_blocksize = CIFS_MAX_MSGSIZE; sb->s_blocksize_bits = 14; /* default 2**14 = CIFS_MAX_MSGSIZE */ -- 2.34.1