Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Aug 2021 09:47:13 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        =?iso-8859-1?Q?=D6zkan?= KIRIK <ozkan.kirik@gmail.com>, FreeBSD Net <freebsd-net@freebsd.org>, freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: Wired Memory Increasing about 500MBytes per day
Message-ID:  <YQlI4cfsiCgH74WK@nuc>
In-Reply-To: <5dc957ec-9483-0a80-b29e-be4b71c1b9d9@yandex.ru>
References:  <CAAcX-AFWQrRjcniS5gKHzFuw3KKVJ-GKkFGmaA6OLwQ5vu9Jyg@mail.gmail.com> <5dc957ec-9483-0a80-b29e-be4b71c1b9d9@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 03, 2021 at 09:38:17AM +0300, Andrey V. Elsukov wrote:
> 02.08.2021 08:00, Özkan KIRIK пишет:
> > Hello,
> > 
> > I'm using FreeBSD stable/12 0f97f2a1857a96563792f0d873b11a16ff9f818c (Jul
> > 25) built.
> > pf, ipfw and ipsec options are built with kernel. The server is used as
> > firewall that squid and snort3 (daq - netmap) is running.
> > 
> > I saw that, wired memory is increasing every day. It's about 500MBytes per
> > day. I'm checking vmstat and top (sorted by res), I couldn't find what is
> > consuming the wired memory.
> > 
> > How can I find that which process or which part of kernel is consuming the
> > wired memory ?
> 
> Hi,
> 
> We noticed the same problem, I'm not sure the exact version, but you can
> check the output:
> # vmstat -z | egrep "ITEM|pgcache"
> 
> The page cache grows until lowmem is not reached. Then it automatically
> cleans and begins to grow again.

The pgcache zones simply provide a per-CPU cache and allocator for
physical page frames.  The sizes of the caches are bounded.  The numbers
of "used" items from the pgcache zones do not really tell you anything
since those pages may be allocated for any number of purposes, including
for other UMA zones.  For instance, if ZFS allocates a buffer page from
its ABD UMA zone, and that zone's caches are empty, UMA may allocate a
new slab using uma_small_alloc() -> vm_page_alloc() -> pgcache zone.

So if there is some wired page leak, the pgcache zones are probably not
directly responsible.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQlI4cfsiCgH74WK>