From nobody Mon Jun 7 18:53:34 2021 X-Original-To: freebsd-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 BFC72E5AB14 for ; Mon, 7 Jun 2021 18:53:37 +0000 (UTC) (envelope-from dave@jetcafe.org) Received: from fedex2.jetcafe.org (fedex2.jetcafe.org [205.147.26.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "fedex2.jetcafe.org", Issuer "R3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzMw04dh3z3rPC for ; Mon, 7 Jun 2021 18:53:36 +0000 (UTC) (envelope-from dave@jetcafe.org) X-Envelope-To: Received: from bigus.dream-tech.com (bigus.jetcafe.org [205.147.26.7]) by fedex2.jetcafe.org (8.16.1/8.15.2) with ESMTPS id 157IrYsH099594 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 7 Jun 2021 11:53:34 -0700 (PDT) (envelope-from dave@jetcafe.org) Date: Mon, 7 Jun 2021 11:53:34 -0700 From: Dave Hayes To: freebsd-stable@freebsd.org Subject: Re: Where might memory be reported? Message-ID: <20210607115334.6e9d1178@bigus.dream-tech.com> In-Reply-To: <20210606160913.167e6c0a@bigus.dream-tech.com> References: <20210606160913.167e6c0a@bigus.dream-tech.com> 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1 ( out of 6) ALL_TRUSTED,SHORTCIRCUIT X-Spam-Checker-Version: SpamAssassin version 3.4.4-jetcafeglobal X-Scanned-By: MIMEDefang 2.83 X-Rspamd-Queue-Id: 4FzMw04dh3z3rPC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of dave@jetcafe.org designates 205.147.26.23 as permitted sender) smtp.mailfrom=dave@jetcafe.org X-Spamd-Result: default: False [-2.26 / 15.00]; RCVD_TLS_ALL(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[205.147.26.23:from]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[205.147.26.23:from:127.0.2.255]; DMARC_NA(0.00)[jetcafe.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.965]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7397, ipnet:205.147.0.0/18, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; MAILMAN_DEST(0.00)[freebsd-stable]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On Sun, 6 Jun 2021 16:09:13 -0700 Dave Hayes wrote: > Consider this output from a 12.2-STABLE box (r368820) on amd64: > > # sysctl vm.stats.vm | grep count > vm.stats.vm.v_cache_count: 0 > vm.stats.vm.v_user_wire_count: 0 > vm.stats.vm.v_laundry_count: 0 > vm.stats.vm.v_inactive_count: 121191 > vm.stats.vm.v_active_count: 20836 > vm.stats.vm.v_wire_count: 754310 > vm.stats.vm.v_free_count: 254711 > vm.stats.vm.v_page_count: 3993253 > > It should be pretty clear that there are missing pages. Where might they be > and how might I find out? Replying to myself here to make the situation clearer. :) So I've noticed on random machines with various different and uncommon services, there's an issue where the reported in-use memory (that I know about, see above) continues to drop until and unless the machine is rebooted. If I do not reboot, the machine will continue up until it runs out of swap space, at which point a reboot is apparently mandatory. Naturally I am trying to monitor the situation, but I can't seem to find what is using the extra memory. I would like to file a bug about this, but first I would like to ensure that I am not missing something obvious (or even non-obvious). As a related addendum, I used to know some of how FreeBSD virtual memory worked but it would appear from 11->12 that this has changed. Thus, I am completely open to be pointed to any documentation or reading about how the virtual memory system has changed (other than source code) between 11 and 12. Thanks in advance for cogent replies. -- Dave Hayes - Consultant - LA CA, USA - dave@dream-tech.com >>>> *The opinions expressed above are entirely my own* <<<< A person is deficient in understanding until they perceive that there is a whole cycle of evolution possible within themselves: repeating endlessly, offering opportunities for personal development.