Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2022 10:07:29 -0700
From:      Pete Wright <pete@nomadlogic.org>
To:        Mark Millard <marklmi@yahoo.com>, freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: Chasing OOM Issues - good sysctl metrics to use?
Message-ID:  <b6017cc8-3734-da81-8c73-5715f2e3ff94@nomadlogic.org>
In-Reply-To: <8C14A90D-3429-437C-A815-E811B7BFBF05@yahoo.com>
References:  <8C14A90D-3429-437C-A815-E811B7BFBF05.ref@yahoo.com> <8C14A90D-3429-437C-A815-E811B7BFBF05@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 5/14/22 01:09, Mark Millard wrote:
>
> One of the points is to see if I get any evidence of
> vm.swap_enabled=0 with vm.swap_idle_enabled=0 ending up
> contributing to any problems in my normal usage. So far: no.
> vm.pageout_oom_seq=120 is in use for this, my normal
> context since sometime in 2018.

So to revive an old thread here.

it looks like setting these two sysctl knobs have helped the situation:
vm.swap_enabled=0
vm.swap_idle_enabled=0

i've gone 7 days without any OOM events under normal work usage (as 
opposed to about 4days previously).  this includes the following patch 
to vm_pageout.c that tijl@ shared with us:

diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 36d5f327580..df827af3075 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1069,7 +1069,7 @@ vm_pageout_laundry_worker(void *arg)
                 nclean = vmd->vmd_free_count +
                     vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt;
                 ndirty = vmd->vmd_pagequeues[PQ_LAUNDRY].pq_cnt;
-               if (target == 0 && ndirty * isqrt(howmany(nfreed + 1,
+               if (target == 0 && ndirty * isqrt(howmany(nfreed,
                     vmd->vmd_free_target - vmd->vmd_free_min)) >= nclean) {
                         target = vmd->vmd_background_launder_target;
                 }


I have adjusted my behavior a little bit as well, since i do quite a bit 
of work in the AWS console in firefox I've been better at closing out 
all of those tabs when i'm not using them (their console is a serious 
memory hog).  i've also started using an official chrome binary inside 
an ubuntu jail which is where i run slack and discord, that seems to 
behave better as well in terms of memory utilization.

i am going to revert the vm_pageout.c patch today when i do my weekly 
rebuild of world to see how things go, maybe that'll give determine if 
its really the sysctl's helping or not.

cheers,
-pete

-- 
Pete Wright
pete@nomadlogic.org
@nomadlogicLA




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b6017cc8-3734-da81-8c73-5715f2e3ff94>