From nobody Thu Feb 29 17:40:39 2024 X-Original-To: freebsd-stable@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 4Tlz6441qVz5CbWr for ; Thu, 29 Feb 2024 17:41:00 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-54.consmr.mail.gq1.yahoo.com (sonic316-54.consmr.mail.gq1.yahoo.com [98.137.69.30]) (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 4Tlz640htgz4BKv for ; Thu, 29 Feb 2024 17:40:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1709228455; bh=G/WNWhygkk+WJzNFT9BzFe/4dffyo8Do3RqLrD02at4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=ExpBpZPkLZwgnIYp0DoraG4OGTSilNMsW0Wt9wA8NXUa6iDEbyinIzSWlYE1etxREA5H2Qp3/q66aJYs9nZCgRu7u1gw7bIiTvS3NjcyuOdmvhyLPgZKO0DrMt6j6GEwcgS+Om560J2PlJK+l4Cf+dZVIFwm/P+HpZXgiC7hZv+zo5Zw6wAjMAIq+fMTZCxKF2cHkd3bVSv8wRs3T3lEKEv+K47m2SzU+CgkLxVVCG1MYR/rrrdMVCW2aMmySn0MShdfdggY/nehNJ2Zfc06aWtPj7jhN7fapk0k6GZZ5NWMtk8vvY4WWKCpbRHWGrTPB+1cwEVDb0H9VcuTYnS4Mg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1709228455; bh=QiQ0wj6Puuu14FzJh9CTwt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YEMsiNpZd3k1vygFZbseYLR8O3.HPDYbG_oLosGJzUiRvF55hbribIH03HUyq8_rGj3nAkaf VqxRk29W0Ylw2rxzT4Xzzfb9nN3_Z5kWgIUWNFy2YKK5KnU3xomI0kAGOOT5R7SlZ6.ZT6ldzPQR nprfvssMd3PiMxz6jiXJnYHMLytfkLeajAkkP0V.PDeABtcuYlBHmvLHOo5iB2iGla7gUQpVAFYL OZ3wlR6QjET01R9Qb_o8UUMIzK1_97nK7CIjxi7HK6alHwRl5RmgVH4Qjpvtn2Yl_oi9P6lA.QBP Wmci2GJpNQoDr_Eoq5ZyqXsn8R54kmj444MBhfI3gY73e7LvaEBpmDlw8pvoN_UpQR1.76.LhxIa Xaqt.9O4N_G5iTZMwyDy0KuV4Z9U7UCWtIFOcnh9AqjhlBDA.DxanQB3FbcHYYgs8QpW6Sr92jOv rRjRmGN19qQymRFtF0zCnHegDAQQq5.I.L3fBZY7ZdChvFGR2BQsf6sqBoh7MsESTMht8QGoNDir xCP6CI50_cACozzXdZQBoiJXmlZXN9VqnkDPwYnnp6Obcz6bnaTaYVeN0iQRv3afElQD9swmp6w- - X-Sonic-MF: X-Sonic-ID: 810f35c7-91f2-441e-859e-e8d7f0c90700 Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Thu, 29 Feb 2024 17:40:55 +0000 Received: by hermes--production-gq1-5c57879fdf-wt62k (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 70c0760451500192e9b5663e21249968; Thu, 29 Feb 2024 17:40:50 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: 13-STABLE high idprio load gives poor responsiveness and excessive CPU time per task From: Mark Millard In-Reply-To: Date: Thu, 29 Feb 2024 09:40:39 -0800 Cc: FreeBSD-STABLE Mailing List , "Edward Sanford Sutton, III" Content-Transfer-Encoding: quoted-printable Message-Id: References: <426089C7-A15C-4B04-BC47-D1F77089C492.ref@yahoo.com> <426089C7-A15C-4B04-BC47-D1F77089C492@yahoo.com> To: Peter X-Mailer: Apple Mail (2.3774.400.31) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4Tlz640htgz4BKv On Feb 29, 2024, at 08:21, Peter wrote: > On Thu, Feb 29, 2024 at 08:02:42AM -0800, Mark Millard wrote: > ! Peter 'PMc' Much wrote on > ! Date: Thu, 29 Feb 2024 13:40:05 UTC : > !=20 > ! > There is an updated patch in the PR 275594 (5 pieces), that works = for > ! > 13.3; I have it installed, and only with that I am able to build = gcc12 > ! > - otherwise the system would just OOM-crash = (vm.pageout_oom_seq=3D5120 > ! > does not help with this). > !=20 > ! The kernel has multiple, distinct OOM messages. Which type are you > ! seeing? : > !=20 > ! "a thread waited too long to allocate a page" >=20 > That one. That explains why vm.pageout_oom_seq=3D5120 did not make a notable difference in the time frame. If you cause a verbose boot the code: if (bootverbose) printf( "proc %d (%s) failed to alloc page on fault, starting OOM\n", curproc->p_pid, curproc->p_comm); likely will report what process had failed to get a page in a timely manor. There also is control over the criteria for this but is is more complicated. In /boot/loader.conf (I'm using defaults): # # For plunty of swap/paging space (will not # run out), avoid pageout delays leading to # Out Of Memory killing of processes: #vm.pfault_oom_attempts=3D-1 # # For possibly insufficient swap/paging space # (might run out), increase the pageout delay # that leads to Out Of Memory killing of # processes (showing defaults at the time): #vm.pfault_oom_attempts=3D 3 #vm.pfault_oom_wait=3D 10 # (The multiplication is the total but there # are other potential tradoffs in the factors # multiplied, even for nearly the same total.) If you can be sure of not running out of swap/paging space, you might try vm.pfault_oom_attempts=3D-1 . If you do run out of swap/paging space, it would deadlock, as I understand. So, if you can tolerate that the -1 might be an option even if you do run out of swap/paging space. I do not have specific suggestions for alternatives to 3 and 10. It would be exploratory for me if I had to try such. For reference: # sysctl -Td vm.pfault_oom_attempts vm.pfault_oom_wait vm.pfault_oom_attempts: Number of page allocation attempts in page fault = handler before it triggers OOM handling vm.pfault_oom_wait: Number of seconds to wait for free pages before = retrying the page fault handler =3D=3D=3D Mark Millard marklmi at yahoo.com