From nobody Wed May 4 20:59:19 2022 X-Original-To: stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7A5491ABE876 for ; Wed, 4 May 2022 20:59:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ktq2c5DNfz4Rgl for ; Wed, 4 May 2022 20:59:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-e93bbb54f9so2426923fac.12 for ; Wed, 04 May 2022 13:59:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZKRSsvSORRBfWKIim+sDLgAw+jko9bqGjzT6/7b4oDQ=; b=ykULymYPIu67vunzWZFrGuucKxUwu89kXf+tje/1cpZVb2EpVPWrvV+TWNs2/Ti8IN ismJXgmpBS0I6l6T7MPxOeXI7zpxKlxv3i4G2uNXzbF6skVLQuQaDprh430oLwBOz3D9 nPcdhMzo+YcyLvzmcrP3HBKclqo/d8PBS58Xn9dwF/djqeMEGIK+005rIcdFU1FSAWaU JTS0klvZqQQX6K35Gj6ImrEKqMVIW8SO7BFDXrVDI8ErU+V2Ggh1LJJRfaJevTF5nTXF umBl7Avc7ftbc5iu8yQ3eAHCUsQ53DDsL6Q59FwhLXpcdEwkW+GF9IsMx1tXjnGnpFyi uZYA== X-Gm-Message-State: AOAM533tkWiusiK8jmX7/EpDw/sF8mC7jNeGqWyENkkpy6ypLI7RwFKn VmYfEbiqyUwnXX3dmDYZnp2rRVt+/s81oFVsq/pGmw/W X-Google-Smtp-Source: ABdhPJzzDV8PqZUXvOfphiIln6qR6zuTh/46Y99SZzdFEfUNhbnxKkejnNb6//DYCglRBu21Pa3CiSDxnOmBmLLMGSo= X-Received: by 2002:a05:6870:a2d2:b0:d7:60ca:5065 with SMTP id w18-20020a056870a2d200b000d760ca5065mr735850oak.72.1651697970358; Wed, 04 May 2022 13:59:30 -0700 (PDT) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 From: Alan Somers Date: Wed, 4 May 2022 14:59:19 -0600 Message-ID: Subject: nfs client's OpenOwner count increases without bounds To: FreeBSD Stable ML Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Ktq2c5DNfz4Rgl X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.160.51 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [0.91 / 15.00]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.160.51:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[stable@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.99)[0.993]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.51:from]; NEURAL_SPAM_SHORT(0.92)[0.916]; MLMMJ_DEST(0.00)[stable]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N I have a FreeBSD 13 (tested on both 13.0-RELEASE and 13.1-RC5) desktop mounting /usr/home over NFS 4.2 from an 13.0-RELEASE server. It worked fine until a few weeks ago. Now, the desktop's performance slowly degrades. It becomes less and less responsive until I restart X after 2-3 days. /var/log/Xorg.0.log shows plenty of entries like "AT keyboard: client bug: event processing lagging behind by 112ms, your system is too slow". "top -S" shows that the busiest process is nfscl. A dtrace profile shows that nfscl is spending most of its time in nfscl_cleanup_common, in the loop over all nfsclowner objects. Running "nfsdumpstate" on the server shows thousands of OpenOwners for that client, and < 10 for any other NFS client. The OpenOwners increases by about 3000 per day. And yet, "fstat" shows only a couple hundred open files on the NFS file system. Why are OpenOwners so high? Killing most of my desktop processes doesn't seem to make a difference. Restarting X does improve the perceived responsiveness, though it does not change the number of OpenOwners. How can I figure out which process(es) are responsible for the excessive OpenOwners? Or is it just a red herring and I shouldn't worry? -Alan