From nobody Wed Jul 19 18:34:14 2023 X-Original-To: freebsd-questions@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 4R5kxZ6qk7z4n1Xc; Wed, 19 Jul 2023 18:34:26 +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 4R5kxX51JYz3l5x; Wed, 19 Jul 2023 18:34:24 +0000 (UTC) (envelope-from pete@nomadlogic.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nomadlogic.org header.s=04242021 header.b=fzgHwV+n; spf=pass (mx1.freebsd.org: domain of pete@nomadlogic.org designates 66.165.241.226 as permitted sender) smtp.mailfrom=pete@nomadlogic.org; dmarc=pass (policy=quarantine) header.from=nomadlogic.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nomadlogic.org; s=04242021; t=1689791655; 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=/jaz3BLndlyFn14v8H7acTnMkOVnYk7eonTBMJn+58Y=; b=fzgHwV+niTzTTt2+GwvfU1SEmAvGKez4CSEVE5LuQNJsWbrKAm0TnzeBBqtvoqdACMWSf6 LvcK7VnnLA+G/3ZUNa0Zm9+6Nf4qF3Uk9cALOkF6/W6xQcFRT1F3h9MyBXrnI2JkDmj2rJ 7OQrKvSYpLH7gcpIa3NEvx+DEoOc9Lo= 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 173c2ee4 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Jul 2023 18:34:14 +0000 (UTC) Message-ID: Date: Wed, 19 Jul 2023 11:34:14 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Swap filling up, usermode process swap usage doesn't explain Content-Language: en-US To: Scott Gasch , freebsd-questions , freebsd-hackers@freebsd.org References: From: Pete Wright In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.95 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_SHORT(-0.95)[-0.951]; DMARC_POLICY_ALLOW(-0.50)[nomadlogic.org,quarantine]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[nomadlogic.org:s=04242021]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:29802, ipnet:66.165.240.0/22, country:US]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org,freebsd-hackers@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[nomadlogic.org:+]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4R5kxX51JYz3l5x X-Spamd-Bar: --- On 7/19/23 07:49, Scott Gasch wrote: > I am running a 13.2-RELEASE GENERIC kernel and seeing a pattern where, > after about 10 days of uptime, my swap begins to fill up. > > > At least they agree about it being 11G.  Is this kernel memory being > paged out to swap?  The machine has 128G of physical memory and isn't > under very heavy load at the moment. > Are you running ZFS by any chance? If so its possible it is trying to use as much memory as possible for the ARC. I've seen this on a few systems which lots of memory. One way to tell is to run "top" and look at the ARC stats: last pid: 71322; load averages: 1.02, 0.94, 0.87 up 8+18:38:34 11:31:26 376 processes: 1 running, 146 sleeping, 229 zombie CPU: 0.6% user, 0.0% nice, 6.5% system, 0.0% interrupt, 93.0% idle Mem: 3599M Active, 18G Inact, 4132M Laundry, 4272M Wired, 892M Free ARC: 1749M Total, 651M MFU, 239M MRU, 1864K Anon, 13M Header, 844M Other 216M Compressed, 758M Uncompressed, 3.52:1 Ratio On a few of my larger memory systems I cap the ARC by setting this sysctl knob (this is like 45G on my system): vfs.zfs.arc.max=45000000000 -pete -- Pete Wright pete@nomadlogic.org @nomadlogicLA