From owner-freebsd-arm@freebsd.org Sat Jul 4 01:15:57 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 2933135E051 for ; Sat, 4 Jul 2020 01:15:57 +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 49zDRb6r3hz40rj for ; Sat, 4 Jul 2020 01:15:55 +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 0641FwcS036992 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 3 Jul 2020 18:15:59 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id 0641Fwnq036991; Fri, 3 Jul 2020 18:15:58 -0700 (PDT) (envelope-from fbsd) Date: Fri, 3 Jul 2020 18:15:58 -0700 From: bob prohaska To: Peter Jeremy Cc: freebsd-arm@freebsd.org, bob prohaska Subject: Re: 1341MB swap in use with half gig of free memory Message-ID: <20200704011558.GA36886@www.zefox.net> References: <20200703224433.GA36511@www.zefox.net> <20200703233938.GB30039@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200703233938.GB30039@server.rulingia.com> X-Rspamd-Queue-Id: 49zDRb6r3hz40rj 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.18 / 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)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.40)[0.398]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[zefox.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.59)[0.585]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.30)[0.300]; 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: Sat, 04 Jul 2020 01:15:57 -0000 On Sat, Jul 04, 2020 at 09:39:38AM +1000, Peter Jeremy wrote: > > The "every few minutes ... one core reaches 100%" implies that every few > minutes one process manages to get hold of enough RAM to work through a > compiling a file. That process then exits and all the RAM it was using > returns to the free pool. > That's one point I was entirely missing. When the only runnable thread finishes, nothing else can run till a working set has been swapped back into ram. As Mark reminds me, at 2MB a second, it easily takes minutes of doing nothing but reading swap to be able to run anything. Thus, the long interval of seeming inactivity. > > I don't think so. The default "run one build process per core" assumes > that there's adequate RAM. It's really difficult for the build process > to know how big a process will get, and so automatically cut back on the > number of parallel processes it spawns. This is one case where I don't > believe there is any alternative to manually specifying "-j1" or > equivalent. > In this case (essentially that of a batch job with no interactive use) would using -j1 or -j2 reduce the overall compilation time? If I'm understanding correctly the answer is "no", -j1 precludes using extra cores when it's possible. From time to time it uses all four. > Note that Chromium is a massive chunk of code. A more normal build > environment would be several dozen quite fast cores with around 3GB RAM > per core. You are really stressing the VM system by trying to build it > with ~256MB/core. > A smaller browser would be a very welcome discovery. So far, chromium is the only one that has worked well enough to be useful. Thanks for writing.... bob prohaska