Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jan 2021 09:17:33 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        Santiago Martinez <sm@codenetworks.net>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: VM UMA counters.
Message-ID:  <YAg7fYcLdoLfFqaI@raichu>
In-Reply-To: <0996195a-6d7f-b058-e95c-b2446688940f@codenetworks.net>
References:  <0996195a-6d7f-b058-e95c-b2446688940f@codenetworks.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 19, 2021 at 12:44:14PM +0000, Santiago Martinez wrote:
> Hi there, sorry to ask this as it might be a silly question...
> 
> Since a few weeks im seeing random locks on application and sometimes
> when using truss it show resource temporally unavailable.
>
> Now, checking random things, i see that the
> vm.uma.256_Bucket.stats.fails counter is increasing while the other are
> not (at least for now).
> 
> Here goes the output:
> 
> vm.uma.256_Bucket.stats.xdomain: 0
> vm.uma.256_Bucket.stats.fails: 762142
> vm.uma.256_Bucket.stats.frees: 41935
> vm.uma.256_Bucket.stats.allocs: 42721
> vm.uma.256_Bucket.stats.current: 786
> 
> root@tucho:/home/smartinez # uname -a
> FreeBSD tucho 13.0-ALPHA1 FreeBSD 13.0-ALPHA1 #13
> main-c256107-g7d3310c4fcdd: Tue Jan 19 10:50:12 GMT 2021    
> smartinez@tucho:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64
> 
> My question is, is this the expected behavior?

There are situations where bucket allocations must fail to avoid
recursing back into the VM.  For instance, allocation of a UMA slab may
require allocation of a radix node entry from UMA, which may attempt
allocation of a bucket, which could trigger allocation of a slab.

It's therefore normal to see a non-zero number of failures after
booting, but after that the bucket zone's caches are populated and
failures should become rare.  Failures might also be triggered during
severe memory shortages.  Could you show vmstat -s from an affected
system?  Are you using any DRM graphics drivers by any chance?



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