From nobody Sun May 29 17:07:29 2022 X-Original-To: freebsd-current@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 021391B43AC4 for ; Sun, 29 May 2022 17:07:46 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [66.165.241.226]) (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 (2048 bits) client-digest SHA256) (Client CN "mail.nomadlogic.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LB4jX53hXz4WpT for ; Sun, 29 May 2022 17:07:44 +0000 (UTC) (envelope-from pete@nomadlogic.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nomadlogic.org; s=04242021; t=1653844052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DCw+eTIPb/SGKCHXyxSht8BOsReV/d3SmzYpWRJpX6E=; b=056fYzCLPUS3Cmgugvoe+EiShYcivxk8L8IOCiYYHPs0e/V8ILNeoFBQYcs4/xqi/kr9rT qGzX0V/WvIBNXrCkOhAbfKf6RSYA8b9kW4yfTPirK0G4PCufS9+ua3RLOsKV8NW9lFtlB4 9ttJkRRddHeaRtlpdLKdKfmksIbygjA= Received: from [192.168.1.160] (cpe-24-24-168-214.socal.res.rr.com [24.24.168.214]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 010bbc8e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 29 May 2022 17:07:31 +0000 (UTC) Message-ID: Date: Sun, 29 May 2022 10:07:29 -0700 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Chasing OOM Issues - good sysctl metrics to use? Content-Language: en-US To: Mark Millard , freebsd-current References: <8C14A90D-3429-437C-A815-E811B7BFBF05.ref@yahoo.com> <8C14A90D-3429-437C-A815-E811B7BFBF05@yahoo.com> From: Pete Wright In-Reply-To: <8C14A90D-3429-437C-A815-E811B7BFBF05@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4LB4jX53hXz4WpT X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nomadlogic.org header.s=04242021 header.b=056fYzCL; dmarc=pass (policy=quarantine) header.from=nomadlogic.org; spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates 66.165.241.226 as permitted sender) smtp.mailfrom=pete@nomadlogic.org X-Spamd-Result: default: False [-2.62 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[nomadlogic.org:s=04242021]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-0.99)[-0.991]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[nomadlogic.org:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[nomadlogic.org,quarantine]; NEURAL_HAM_SHORT(-0.63)[-0.625]; MLMMJ_DEST(0.00)[freebsd-current]; FREEMAIL_TO(0.00)[yahoo.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:29802, ipnet:66.165.240.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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