From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18847C433DF for ; Wed, 1 Jul 2020 00:55:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEEDB206CB for ; Wed, 1 Jul 2020 00:55:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sJPyZ4Et" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbgGAAz3 (ORCPT ); Tue, 30 Jun 2020 20:55:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbgGAAz2 (ORCPT ); Tue, 30 Jun 2020 20:55:28 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 385BEC061755 for ; Tue, 30 Jun 2020 17:55:28 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id f7so19026026wrw.1 for ; Tue, 30 Jun 2020 17:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=w5fiJW6n3sAfYyHmixvuwkB+kRXMBP2micRtspTnPKM=; b=sJPyZ4EtLJLajdteuRpipuX/VbUcHLIe55XzDT4YielPuQGcxZkXZ7sTuwXIijWR+E njXXmgnUnk1dOnZFtDmavEniH9d83fobGBwn+VCeLnEYetsTGa/USvs6TnVMcFoBlptM LccEch4gcsdqO/tD7gF/annqoPXvjmsLQqYQlcjAB2ctvfBxi2BlzLIfctr9mfLShTQw nOW+GpRTeUakIh6hBEYGmL8x8hGrbVC5GNwI6LWs+RzP7mTX4dp3sM+JMw33Fh1gAVDP qY2zDZ4AFdbhvNBlZb7nHPXU61XVQLoWSTvN1Bknj102anCWfMSWLgWl0/9yvFm1fN7N VWNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=w5fiJW6n3sAfYyHmixvuwkB+kRXMBP2micRtspTnPKM=; b=X/gAJGZd7TQhSrH+K9lP1FtN6r1fOguK0rMXJuRjYuITgRb14tKTIH7/EyQKd0N5sn dzlPvEeDvc4kJXcqoydIybfuTV/8kBAi6yJaDE+n+Lw4nBLg36LPtjxgJYtNDj6XHM1A kEhlcn+uiPRBgax4Q7UQMsCeonIfQswomYot9DqKeKQPPl0yi2MGFk1FRdPlsDg/OPEs 5UOS4Kr/B3kNM8nTm6FXx+LHuVNBJuYJ5CCsUnwkp/0Q0kRajPq+vH61WAo5Z8tC/KB/ aI1nEYIlS3iGSX3STktmRPiH9Ky+V5CYy0B1RDIhVnstev7Fgz2yJUGs5UTIWF7DbIXe T/Ow== X-Gm-Message-State: AOAM531olOeFbx/98d87hLSwCHrDNvXNSsaAu0WiPC2zgsLCOhVK2Lxj r4cHcQykWkbNL2eymfDkF3f9mn3yNUsDvV4UQaOUeAWT X-Google-Smtp-Source: ABdhPJwGDF8I3LedpBhcMVk1OsGzEH91iRmABTVr+zVDCZPS4VmLw/6zHMHcUQsuDYXE3ejbRTfyGh3WUXNrDMarI2Q= X-Received: by 2002:a5d:6088:: with SMTP id w8mr23567575wrt.49.1593564926547; Tue, 30 Jun 2020 17:55:26 -0700 (PDT) MIME-Version: 1.0 From: Pradeep Date: Tue, 30 Jun 2020 17:55:15 -0700 Message-ID: Subject: File create performance between NFSv3 and NFSv4. To: Linux NFS Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hello, While testing a performance issue, I noticed that the number of creates that an NFS client can do over NFSv4 is significantly lower compared to NFSv3. I'm using the test below: https://github.com/distributed-system-analysis/smallfile Command run: smallfile_cli.py --operation create --threads 128 --file-size 1 --files 1024 --top [ 128 threads, each doing 1024 file creates of 1K size] This gives around 1169 creates/sec with NFSv4.1 and 8073 creates/sec with NFSv3. This is with the exact same client and server. NFS server is tuned to use 200 threads. When I looked at tcpdump, I noticed that over NFSv3 multiple parallel requests are being sent and NFSv4 is pretty much serial. Is there anything that I can tune to improve NFSv4 performance w.r.t to file creations? This also shows up in benchmarks like SpecFS SWBUILD's INIT phase where millions of files are getting created. Thanks, Pradeep