From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Larger GC thresholds for non-interactive Emacs Date: Fri, 17 Jun 2022 18:39:31 +0000 Message-ID: References: <87h74l9jk8.fsf@localhost> <83bkutqb3z.fsf@gnu.org> <9778F176-E724-4E61-B0FB-327BCDD316C0@acm.org> <87sfo4epeo.fsf@localhost> <87bkurrc5e.fsf@localhost> <87bkur72b7.fsf@gnus.org> <874k0j40e7.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30904"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Ihor Radchenko , Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , Eli Zaretskii , Tim Cross , rms@gnu.org, emacs-devel To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 20:42:09 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2Gv3-0007ov-C3 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 20:42:09 +0200 Original-Received: from localhost ([::1]:42114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2Gv1-0004Py-MY for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 14:42:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2Gsv-0003Z8-G4 for emacs-devel@gnu.org; Fri, 17 Jun 2022 14:39:57 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:32380 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1o2Gsl-0005gc-Ou for emacs-devel@gnu.org; Fri, 17 Jun 2022 14:39:56 -0400 Original-Received: (qmail 54553 invoked by uid 3782); 17 Jun 2022 18:39:32 -0000 Original-Received: from acm.muc.de (p4fe15532.dip0.t-ipconnect.de [79.225.85.50]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 17 Jun 2022 20:39:32 +0200 Original-Received: (qmail 13116 invoked by uid 1000); 17 Jun 2022 18:39:31 -0000 Content-Disposition: inline In-Reply-To: <874k0j40e7.fsf@gnus.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291314 Archived-At: Hello, Lars. On Fri, Jun 17, 2022 at 20:20:48 +0200, Lars Ingebrigtsen wrote: > Stefan Monnier writes: > > Here are the results of a similar test where I tried to avoid the above > > problem by also removing src/boostrap-emacs (and I also rm'd > > lisp/loaddefs.el for good measure tho it was probably not a great idea), > > and I used > > BYTE_COMPILE_EXTRA_FLAGS="--eval '(setq gc-cons-percentage $FOO)'": > > make -j24 FOO=0.1 1338.52s user 60.95s system 1256% cpu 1:51.42 total > [...] > > make -j24 FOO=2.0 678.14s user 68.64s system 1044% cpu 1:11.52 total > Nice! > > This suggests that for batch jobs maybe we should bump up > > `gc-cons-percentage` from 0.1 to something like 1.0 or 2.0. > Yup. But do you mean in general? I.e., -batch would set that variable > to 2.0? Would there be any likely major repercussions -- i.e., jobs > that used to run fine would run out of memory? > As a quick test, I added a (setq gc-cons-percentage 2.0) to startup.el > here, and a > git clean -dfx > time make -j32 > went from 1m29s to 1m4s. Just as another independent test (as if any were needed), I put BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq gc-cons-threshold 50000000)' into lisp/Makefile.in, and my time for $ make -j17 bootstrap dropped from 5m52s to 3m35s, a drop of 39%. Watching the .elc's being built was noticeably faster, even to the naked eye. This was a build with native compilation enabled. > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no -- Alan Mackenzie (Nuremberg, Germany).