From nobody Thu Jun 04 17:09:09 2026 X-Original-To: freebsd-hackers@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 4gWWJL5V8Hz6gdb6 for ; Thu, 04 Jun 2026 17:09:22 +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 4gWWJL36Qnz4BP0 for ; Thu, 04 Jun 2026 17:09:22 +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=1780592955; bh=l18CFh5VSj/RMqjHVvZLWSl5KZhpW1WUXo9abdIr9FU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=a8sMMkhIOgt3LX+uEA5UPVj/qWcwAR8Jw45trwqKo4sgVjPbVnFQpUMoV3ryPRDYw829N7z+U2RDPujX33BrCGF7+Nl466BSESsxv0OLA+DIfbpzpzCy7PdOojeBLeexP/eG0Si0GwzeiyDOjulaApzR8ewC3BVmJQP0D7Lte+t4xXm/lwa58kzKFFLirKqmBUJ3BpLNRXVDxCHCT+Oeq34xV9hgHynhP2aA9lzW4OSmY6V/i9StHn88s7JeF6qPOLUhhFIhaFmGnu5F+kXsE2cAyUycGPBr1TkrPWv7mvt665YcSt8d4lAi3q5MTOsbS7Y5oZlaL6uI1a+PuE3Qsw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1780592955; bh=qh1nBAUY8luDMmbL+fleBUh2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ju40dMiuZp0oWcqw2C WZ0bvOn0HM_6lnonNbKW4x_rvyJYmWd0q4FyDu6QVyfU_RZLgGkLI_nBGvXFDdIlPApbtYKZm9ix sJiRpjGgRoeGq5628hY5evwr2IYmnb1E7b21asK9YclRzDnMfMqKszBCHVdJOCcUlz4qBAsVfcS_ ZxWKHz5RmV_b4p.I1CNfnS7mi2GtZsBkF4sosq0dubKNKOGT5vezLDnuAnINQXX5GlMAp8gm.whN wYVbpLMLsghlVaurm41KiL4cZSaVotn9wVK3N2S6NvdY5oQWUpNHFnyQNhRhVr_vgtZ4qlOdRn4_ lWut59dT2.jR3cZ2ubhJ3tkigu4kFXfRimFxddShsPxueSzfIe6eHnm3jzIb22pOGwlK.I5LRdK. 5T6XT6N9YeCy97W5Uy5qSOyg_bD0g1O71mkUWx8pBXeyMAR_kKK2w1gjmQwtkhz2ljDAOx0iw9S3 s6RUy0TmVVkwEwZ9o7zUsP3YYzgVM3enAuJz0aNzUheuwAcHIoFGpClAiWy9W5ZUFYEhLTnDSuen q511tpU59dw.uBa8Sd80eUs40wXgZMt0KBf5yF1HxZMhkUxcR6cPj0taupZ_gz4rnwIB6iN33jD2 ByYTGEJWpjD3PLegyXX82Xlrb_AVV18VIgXCvVHa_aeDloHmvlZReKmFBhw-- X-Sonic-MF: X-Sonic-ID: 647d4600-ed3e-4c31-9f9c-b165a4693191 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Thu, 4 Jun 2026 17:09:15 +0000 Received: by hermes--production-gq1-7bb7df5c46-5hl7q (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a14685a72c8e7974a9ab7f31fe9d0e70; Thu, 04 Jun 2026 17:09:09 +0000 (UTC) Message-ID: <565d0725-c8b9-4b5e-9037-beeaf2e60660@yahoo.com> Date: Thu, 4 Jun 2026 10:09:09 -0700 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: optimize pagedaemon settings To: Mark Johnston , Rozhuk Ivan Cc: freebsd-hackers@freebsd.org References: <20260603023300.24974be1@rimwks.local> Content-Language: en-US From: Mark Millard In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.25882 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4gWWJL36Qnz4BP0 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On 6/4/26 09:00, Mark Johnston wrote: > On Wed, Jun 03, 2026 at 02:33:00AM +0300, Rozhuk Ivan wrote: >> Hi! >> >> >> Is it possible to tune something in sysctl to reduce CPU usage by "pagedaemon" and convert more "Laundry" to "Free"? >> >> >> >> .... >> Mem: 25G Active, 242M Inact, 67G Laundry, 31G Wired, 1505M Buf, 878M Free > > Is there no swap configured on this system? If not, then the pagedaemon > cannot reclaim those laundry pages. I'll add some words to that: laundry pages are dirty, meaning they have no alternate copy to restore for later use but contain information that has not been freed. Just freeing those pages would destroy that information. By contrast, paging laundry pages to the swap space first allows restoring the content later after the free by paging back what was saved. In other words: laundry is basically pages that have been fully classified and prepared for potential paging out to a swap space. Absent the swap space having been configured for operation, the page stays in RAM to avoid a loss of information. (That also happens when the swap space is fully used already.) > >> PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND >> 65951 nobody 33 141 0 36G 33G CPU16 16 63.2H 2711.41% /usr/local/bin/llama-server --cpu-strict 1 --host 127.0.0.1 --mmap --no-host --offline -- >> 7 root 3 -15 - 0B 72K CPU0 0 766:00 100.06% [pagedaemon] >> 1086 rim 44 111 0 8555M 4020M CPU24 24 32.1H 97.92% /usr/local/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:49179 -prefMapHan >> 98907 rim 384 1 0 46G 13G select 9 42.6H 58.60% /usr/local/bin/firefox -P default >> 84880 rim 47 29 0 801M 253M select 3 4:45 44.80% iridium: --type=gpu-process --ozone-platform=x11 --enable-crash-reporter=, --change-stack- >> .... >> >> >> My current settings: >> vm.cluster_anon=2 # Cluster anonymous mappings: 0 = no, 1 = yes if no hint, 2 = always // def: 1 >> vm.overcommit=0 # Configure virtual memory overcommit behavior. See tuning(7) for details. >> vm.pageout_update_period=20 # Maximum active LRU update period (seconds) >> vm.lowmem_period=2 # Low memory callback period (seconds) >> vm.act_scan_laundry_weight=16 # weight given to clean vs. dirty pages in active queue scans / def: 3 >> vm.background_launder_rate=65536 # background laundering rate, in kilobytes per second / def: 4096 >> vm.background_launder_max=524288 # background laundering cap, in kilobytes / def: 20*1024 >> vm.domain.0.pageout_helper_threads_enabled=1 # Enable multi-threaded inactive queue scanning / see also vm.pageout_cpus_per_thread / def: 1 >> vm.domain.1.pageout_helper_threads_enabled=1 # Enable multi-threaded inactive queue scanning / see also vm.pageout_cpus_per_thread / def: 1 >> vm.domain.2.pageout_helper_threads_enabled=1 # Enable multi-threaded inactive queue scanning / see also vm.pageout_cpus_per_thread / def: 1 >> vm.domain.3.pageout_helper_threads_enabled=1 # Enable multi-threaded inactive queue scanning / see also vm.pageout_cpus_per_thread / def: 1 >> vm.swap_enabled=0 # Enable entire process swapout >> vm.swap_idle_enabled=1 # Allow swapout on idle criteria / def: 0 >> vm.swap_idle_threshold1=4 # Guaranteed swapped in time for a process / def: 2 >> vm.swap_idle_threshold2=16 # Time before a process will be swapped out / def: 10 >> vm.disable_swapspace_pageouts=0 # Disallow swapout of dirty pages / def: 0 >> vm.kstack_cache_size=512 # Maximum number of cached kernel stacks >> >> >> > > -- === Mark Millard marklmi at yahoo.com