From nobody Mon Jun 7 19:11:44 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 439F5E5C468 for ; Mon, 7 Jun 2021 19:10:58 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (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 (4096 bits) client-digest SHA256) (Client CN "ultimatedns.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FzNJ20NJRz3tXm for ; Mon, 7 Jun 2021 19:10:57 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 157JBiut004396; Mon, 7 Jun 2021 12:11:50 -0700 (PDT) (envelope-from bsd-lists@bsdforge.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 Date: Mon, 07 Jun 2021 12:11:44 -0700 From: Chris To: Dave Hayes Cc: freebsd-stable@freebsd.org Subject: Re: Where might memory be reported? In-Reply-To: <20210607115334.6e9d1178@bigus.dream-tech.com> References: <20210606160913.167e6c0a@bigus.dream-tech.com> <20210607115334.6e9d1178@bigus.dream-tech.com> User-Agent: UDNSMS/17.0 Message-ID: <6c174c830019d133fbb4daefe442fb40@bsdforge.com> X-Sender: bsd-lists@bsdforge.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4FzNJ20NJRz3tXm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2021-06-07 11:53, Dave Hayes wrote: > 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. FWIW I'm experiencing this same situation on one of my 12 servers. I've been carefully monitoring it in hopes that 1) the swap was eventually sufficiently purged 2) that I could discover what was preventing 1) from occurring Nice to know I'm not a _too_ isolated situation. Thanks for bringing it up, Dave. :-) --Chris > > 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.