Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Apr 2021 13:01:31 +1000
From:      Dewayne Geraghty <dewayne@heuristicsystems.com.au>
To:        freebsd-stable@freebsd.org
Subject:   Re: stable/13, vm page counts do not add up
Message-ID:  <7b47289d-2f6d-0400-b97c-e23bb27e28af@heuristicsystems.com.au>
In-Reply-To: <YG4ckaRbub6kEFO8@nuc>
References:  <0606571f-fec0-c7ad-98e8-a0b8554918e2@FreeBSD.org> <YG4OAVa0ohh4illU@nuc> <f509bf54-e283-eb29-2db2-1457dae7bc13@FreeBSD.org> <YG4ckaRbub6kEFO8@nuc>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/04/2021 6:56 am, Mark Johnston wrote:
> On Wed, Apr 07, 2021 at 11:22:41PM +0300, Andriy Gapon wrote:
>> On 07/04/2021 22:54, Mark Johnston wrote:
>>> On Wed, Apr 07, 2021 at 10:42:57PM +0300, Andriy Gapon wrote:
>>>>
>>>> I regularly see that the top's memory line does not add up (and by a lot).
>>>> That can be seen with vm.stats as well.
>>>>
>>>> For example:
>>>> $ sysctl vm.stats | fgrep count
>>>> vm.stats.vm.v_cache_count: 0
>>>> vm.stats.vm.v_user_wire_count: 3231
>>>> vm.stats.vm.v_laundry_count: 262058
>>>> vm.stats.vm.v_inactive_count: 3054178
>>>> vm.stats.vm.v_active_count: 621131
>>>> vm.stats.vm.v_wire_count: 1871176
>>>> vm.stats.vm.v_free_count: 187777
>>>> vm.stats.vm.v_page_count: 8134982
>>>>
>>>> $ bc
>>>>>>> 187777 + 1871176 + 621131 + 3054178 + 262058
>>>> 5996320
>>>>>>> 8134982 - 5996320
>>>> 2138662
>>>>
>>>> As you can see, it's not a small number of pages either.
>>>> Approximately 2 million pages, 8 gigabytes or 25% of the whole memory on this
>>>> system.
>>>>
>>>> This is 47c00a9835926e96, 13.0-STABLE amd64.
>>>> I do not think that I saw anything like that when I used (much) older FreeBSD.

For reference, I think that a smaller error has been around for awhile.
 On a UFS only system,
FreeBSD 12.2-STABLE #0 r369523M: Sat Mar 27 00:27:03 AEDT 2021
I have:

# sysctl vm.stats | fgrep count; top -b
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: 423959
vm.stats.vm.v_active_count: 82623
vm.stats.vm.v_wire_count: 256273
vm.stats.vm.v_free_count: 5457329
vm.stats.vm.v_page_count: 6112118
last pid: 83881;  load averages:  0.07,  0.09,  0.06  up 0+07:31:44
12:59:37
90 processes:  1 running, 89 sleeping
CPU:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt, 99.9% idle
Mem: 323M Active, 1656M Inact, 1001M Wired, 585M Buf, 21G Free
Swap: 24G Total, 24G Free

# bc
423959+82623+256273+5457329
6220184
6112118 - 6220184
-108066



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7b47289d-2f6d-0400-b97c-e23bb27e28af>