From owner-freebsd-questions@freebsd.org Fri Sep 25 06:32:33 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1691C3EC888 for ; Fri, 25 Sep 2020 06:32:33 +0000 (UTC) (envelope-from dewayne@heuristicsystems.com.au) Received: from hermes.heuristicsystems.com.au (hermes.heuristicsystems.com.au [203.41.22.115]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2560 bits) client-digest SHA256) (Client CN "hermes.heuristicsystems.com.au", Issuer "Heuristic Systems Type 4 Host CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ByMXc2tGHz4j4y for ; Fri, 25 Sep 2020 06:32:32 +0000 (UTC) (envelope-from dewayne@heuristicsystems.com.au) Received: from [10.0.5.3] (noddy.hs [10.0.5.3]) (authenticated bits=0) by hermes.heuristicsystems.com.au (8.15.2/8.15.2) with ESMTPSA id 08P6Vfq2078710 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Fri, 25 Sep 2020 16:31:41 +1000 (AEST) (envelope-from dewayne@heuristicsystems.com.au) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=heuristicsystems.com.au; s=hsa; t=1601015501; x=1601620302; bh=hlBRds99HvBNuXsEdt9Oaiw29yaWtISi9uPH8BAzgm4=; h=From:Subject:To:Message-ID:Date; b=MEGg5Axvq20eooweWbbj8DQDrg/mcq08ObsPxEY0p+KTxNLHK1PZjMODXwjUvSPCy mTTwf9SaSLLmIlOdqa9iLBYmjPlAlttUQ9+Zm+mWJeVB46zbFA/94QnE9WMhfm7ISo NFgODubfFyssFI2clNw2w5vFUcy5MZZRy0T5ByftEOGPkUdcB+rHG X-Authentication-Warning: b3.hs: Host noddy.hs [10.0.5.3] claimed to be [10.0.5.3] From: Dewayne Geraghty Subject: Clarification of vnode sysctls as numvnodes doesnt decrease (FBSD12.2)? To: "freebsd-questions@freebsd.org" Message-ID: <9081f04a-3fdf-2435-5efc-47eb5f233225@heuristicsystems.com.au> Date: Fri, 25 Sep 2020 16:31:43 +1000 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4ByMXc2tGHz4j4y X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=heuristicsystems.com.au header.s=hsa header.b=MEGg5Axv; dmarc=none; spf=pass (mx1.freebsd.org: domain of dewayne@heuristicsystems.com.au designates 203.41.22.115 as permitted sender) smtp.mailfrom=dewayne@heuristicsystems.com.au X-Spamd-Result: default: False [-3.94 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; HAS_XAW(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; DKIM_TRACE(0.00)[heuristicsystems.com.au:+]; RCVD_IN_DNSWL_MED(-0.20)[203.41.22.115:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:1221, ipnet:203.40.0.0/13, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; R_DKIM_ALLOW(-0.20)[heuristicsystems.com.au:s=hsa]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[heuristicsystems.com.au:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.976]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[heuristicsystems.com.au]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_SHORT(0.23)[0.234]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2020 06:32:33 -0000 I used procstat to tally the number of vnodes that are actually in use, in my case its 925. Now this is relatively idle (load <10%) unless its building os or ports. As we do build in jails, we have a large number of vnodes. From sysctl's kern.maxvnodes=700000 vfs.wantfreevnodes=175000 vfs.numvnodes=700000 vfs.ncpurgeminvnodes=256 should vfs.numvnodes be read as 700,000 vnodes are available, or as the memory has been allocated, or remain linked in some way to the file that they were previously associated with(the latter seems crazy)? In previous versions of FreeBSD the vfs.numvnodes did decrease, somewhat. If the vnodes are allocated, then during idle periods, would be a good time to vacuum the vnodes, but how? On FreeBSD 12.2-STABLE #0 r365645M -------------------- Machines current state from tallying "procstat -f -a" and some relevant sysctls: Procstat file descriptor types vn sock pipe fifo cryp shmem msg posix kque Proc term 925 302 342 99 0 3 0 0 20 0 15 Procstat vnode types block char dir fifo slink regfile sock revdev notvn 0 289 303 0 0 333 0 0 782 Correlate with kern.openfiles=857 kern.ipc.numopensockets=264 Network connections via netstat -na: 160