From owner-freebsd-arm@freebsd.org Fri Jul 3 22:44:37 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E22A035B6A7 for ; Fri, 3 Jul 2020 22:44:37 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (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 "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49z9505NtLz3byS for ; Fri, 3 Jul 2020 22:44:36 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id 063MiY8n036601 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 3 Jul 2020 15:44:34 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 063MiXZM036600; Fri, 3 Jul 2020 15:44:33 -0700 (PDT) (envelope-from fbsd) Date: Fri, 3 Jul 2020 15:44:33 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Subject: 1341MB swap in use with half gig of free memory Message-ID: <20200703224433.GA36511@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 49z9505NtLz3byS X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net X-Spamd-Result: default: False [3.90 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.92)[0.925]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.53)[0.532]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.54)[0.544]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 22:44:37 -0000 In watching wwwchromium (very) slowly compile on a Pi3 running r362742-current something strange showed up: It had half a gig of "free" memory, but still has over a gig of swap in use. The swap device is saturated. Here's snippet of top output: last pid: 77187; load averages: 0.56, 0.80, 0.82 up 4+19:29:15 14:39:56 39 processes: 1 running, 38 sleeping CPU: 0.1% user, 0.0% nice, 0.2% system, 0.1% interrupt, 99.6% idle Mem: 80M Active, 63M Inact, 3508K Laundry, 176M Wired, 97M Buf, 580M Free Swap: 3547M Total, 1341M Used, 2206M Free, 37% Inuse, 1188K In It isn't entirely stuck, every few minutes free memory wanders down to 20MB and one core reaches 100% use, but in general it seems to keep considerable free memory in preference to reducing swap use. That would seem to be unhelpful in this use case. The machine has a 1TB mechanical hard disk with a single root partition and single swap partition. Make is running without explicit -j value, and appears to be attempting -j4. Earlier in the build it seemed to be running more rapidly, but over the last day or so it has gone from mostly busy to mostly idle with not much change in swap use. There are no errors or warnings on the console, and no complaint about swap quantitiy on boot. Obviously it's possible to use -j or MAX_JOBS_NUMBER, but reluctance to keep all memory in use makes me wonder if something else is amiss. Looking at man tuning revealed nothing I recognized as relevant. Thanks for reading! bob prohaska