From nobody Sun May 29 18:16:09 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 3B2BA1B58D1C for ; Sun, 29 May 2022 18:16:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-24.consmr.mail.gq1.yahoo.com (sonic312-24.consmr.mail.gq1.yahoo.com [98.137.69.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LB6Dm1GMPz4gC9 for ; Sun, 29 May 2022 18:16:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653848175; bh=wuMGqQrEpXEp1YpR5pzMM30ldIWJP+awpzpFLrtjzgc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=l1YxiJIY98lQ0JWijWhkYK4lJBWT7X7gd4Rl9jiYHMI0nCYrFOvf5cc69Jmw66yQo6SotiPDuI5+dMiYJS/s3ra8w80XSCtZC8KaATqKpCTrRe8UrMvDhY3HaspjjSfXP1yy72o6mCHyCZk1J4TaD1RRwevszDXviRTSphy8W6PiqGVIDwLVe2+gwujl+Jx019Jk1DnGvOLENLyaKb1P1DyKMEBDnm92if8o9CyPec2srFQrTVVDBqOdQ/B9vrjw+WJRFbIQbgYOAdxkUAh52LgOTmqoyD1RRcoyBE1ImIlYB+iI++xoS5Lr3VFhcRyjymT+x2YVBtg6ojlOYlrKRw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1653848175; bh=KJdAZObhEQz46argFZZzLjzBpmpq3kGZdLIrQDDCRDG=; h=X-Sonic-MF:Subject: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yHFF1Q0A1oCktnk3PbwCa.etwX5A1rHN5MDEG 14.cbC3Q6ZyhqK3gjB13_c3SLaVurbvtIweIcF99KOFsIyte.u0boHMwy5SeqAIAkATYFy6tTf95 4WKoqH.YBsahZaFLB.xXMC42hLNx.OJmaDMmvQOEfdRYLg0ELNcy8RvaErOFTG7lPh59E.I1jTCZ 5YBk12MmLTwnL4xKt8CR8RdYnoOoaSPcZah2T.BR.i3rPNVCL2hLuLVd17ORgfRQLIVtQAGAjs5E rs8W5ot7b0Z7OpxPZBrFvYfQNZpXeTb4YAY4Tf5C9690nsM7gp7fY6n1t5uDu3K9v0TgWqs_l7Au vwRt9PC1YpEcnTtj02qlBpiKes97WHSdOJCN4rcf1atplnftHEn2liNE0CQ5xMhNVA1U8bLKdpdc koSNLX2mMlF9Hv2S2OcNEijmUR3vm_V31.bo6YhYM5uFPVonoJ6P.n9WADC9hQhKy6Y7x8_00NDx YpLEst0Ca1nm49eNnlRFBHp83JgLEwu3PPjsty5Olx4_w0NnNlje6B5q9F0SLvxN.KGDDALdHhBd TN58gD.6hsZ_L X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Sun, 29 May 2022 18:16:15 +0000 Received: by hermes--canary-production-gq1-54945cc758-dgl4g (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 82d274c11d8a018bf0f2e871f8d8ee75; Sun, 29 May 2022 18:16:10 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Chasing OOM Issues - good sysctl metrics to use? From: Mark Millard In-Reply-To: Date: Sun, 29 May 2022 11:16:09 -0700 Cc: freebsd-current Content-Transfer-Encoding: quoted-printable Message-Id: References: <8C14A90D-3429-437C-A815-E811B7BFBF05.ref@yahoo.com> <8C14A90D-3429-437C-A815-E811B7BFBF05@yahoo.com> To: Pete Wright X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4LB6Dm1GMPz4gC9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=l1YxiJIY; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [0.65 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-0.29)[-0.295]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.76)[0.762]; NEURAL_HAM_LONG(-0.32)[-0.318]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.205:from]; MLMMJ_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N On 2022-May-29, at 10:07, Pete Wright wrote: > On 5/14/22 01:09, Mark Millard wrote: >>=20 >> One of the points is to see if I get any evidence of >> vm.swap_enabled=3D0 with vm.swap_idle_enabled=3D0 ending up >> contributing to any problems in my normal usage. So far: no. >> vm.pageout_oom_seq=3D120 is in use for this, my normal >> context since sometime in 2018. >=20 > So to revive an old thread here. >=20 > it looks like setting these two sysctl knobs have helped the = situation: > vm.swap_enabled=3D0 > vm.swap_idle_enabled=3D0 >=20 > i've gone 7 days without any OOM events under normal work usage (as = opposed to about 4days previously). FYI, the combination: vm.pageout_oom_seq=3D120 # in /boot/loader.conf vm.swap_enabled=3D0 # in /etc/sysctl.conf vm.swap_idle_enabled=3D0 # in /etc/sysctl.conf still has not caused me any additional problems and helps avoid loss of access by avoiding the relevant interaction-processes from having their kernel stacks swapped out. (Not that the effect of vm.swap_enabled=3D0 is limited to interaction-processes.) So, the combination is now part of the configuration of each FreeBSD that I use. > this includes the following patch to vm_pageout.c that tijl@ shared = with us: >=20 > 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 =3D vmd->vmd_free_count + > vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt; > ndirty =3D vmd->vmd_pagequeues[PQ_LAUNDRY].pq_cnt; > - if (target =3D=3D 0 && ndirty * isqrt(howmany(nfreed + = 1, > + if (target =3D=3D 0 && ndirty * isqrt(howmany(nfreed, > vmd->vmd_free_target - vmd->vmd_free_min)) >=3D = nclean) { > target =3D vmd->vmd_background_launder_target; > } FYI: I restored the original code after doing the testing for tijl@ . > 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. >=20 > 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. =3D=3D=3D Mark Millard marklmi at yahoo.com