From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Larger GC thresholds for non-interactive Emacs Date: Fri, 17 Jun 2022 13:48:46 -0400 Message-ID: References: <87pmjhghu2.fsf@localhost> <835yl910gp.fsf@gnu.org> <87wndndbhq.fsf@gmail.com> <83bkuzznws.fsf@gnu.org> <877d5mqmkh.fsf@localhost> <83y1y2utnd.fsf@gnu.org> <87r13up587.fsf@localhost> <83o7yyur0l.fsf@gnu.org> <87leu2p3nu.fsf@localhost> <83leu2uewn.fsf@gnu.org> <87r13qv701.fsf@localhost> <83bkuursya.fsf@gnu.org> <87h74l9jk8.fsf@localhost> <83bkutqb3z.fsf@gnu.org> <9778F176-E724-4E61-B0FB-327BCDD316C0@acm.org> <87sfo4epeo.fsf@localhost> <87bkurrc5e.fsf@localhost> <87bkur72b7.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17813"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Ihor Radchenko , Mattias =?windows-1252?Q?Engdeg?= =?windows-1252?Q?=E5rd?= , Eli Zaretskii , Tim Cross , rms@gnu.org, Alan Mackenzie , emacs-devel To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 19:50:50 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 1o2G7M-0004PQ-OA for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 19:50:49 +0200 Original-Received: from localhost ([::1]:46612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2G7L-00022n-Jp for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 13:50:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2G5X-0000We-2h for emacs-devel@gnu.org; Fri, 17 Jun 2022 13:48:55 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12025) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2G5U-0003bX-7r; Fri, 17 Jun 2022 13:48:53 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DDFA7441758; Fri, 17 Jun 2022 13:48:49 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1A6E444172B; Fri, 17 Jun 2022 13:48:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1655488128; bh=6GAAIn8KZ2YrJn7OULAO6+EKxm5PQxegrBnkhm2yTRM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=SyoyJSSuLFPzKyvV9GYg1F7/ur2KKYVW3e6vWeZVhjhAzTvJJJFgIT1wZJHHQIiEK bvnNzvUxXylbC9JZfh0qu+pwsks2YFtcz7cuJNgxBPsg/P6hA7Du7H3ST5qW+9Pg2y MSX4EzJxn67GlSR1s5Ag/LrSvFrtuI5eOvGMINyHvvqc5UDMNMKB3fJrbrZ8De6pfN 7D7+7dn4FWYTHndjstVDmpsTdD7tpxTjVSkXKL7bu/h2cGZn4GkS337JMWsoJZe1DI ibtyOw9g3pLZnjcCDBY7rQnWeHzeyTESzkll9EAsxE1rjGHRPA1VMOQZknFQEjPfbH 1KRKJQ8dSP3SA== Original-Received: from alfajor (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D652B1204B7; Fri, 17 Jun 2022 13:48:47 -0400 (EDT) In-Reply-To: <87bkur72b7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 17 Jun 2022 17:11:08 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:291307 Archived-At: > rm lisp/*/*.elc > time make -j32 IIRC this test can give surprising results because it's strongly affected by the time when the byte-compiler files get compiled which is somewhat arbitrary. > goes from 29s to 14s. Wow! 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=0.1 1338.36s user 60.60s system 1252% cpu 1:51.65 total make -j24 FOO=0.1 1339.53s user 60.08s system 1252% cpu 1:51.76 total make -j24 FOO=0.2 1266.54s user 59.75s system 1264% cpu 1:44.92 total make -j24 FOO=0.2 1269.17s user 60.18s system 1256% cpu 1:45.83 total make -j24 FOO=0.2 1266.10s user 60.42s system 1258% cpu 1:45.43 total make -j24 FOO=0.3 1200.06s user 60.24s system 1251% cpu 1:40.73 total make -j24 FOO=0.3 1198.80s user 60.06s system 1254% cpu 1:40.39 total make -j24 FOO=0.3 1202.49s user 59.60s system 1252% cpu 1:40.80 total make -j24 FOO=0.4 1134.26s user 59.75s system 1233% cpu 1:36.81 total make -j24 FOO=0.4 1133.11s user 60.07s system 1226% cpu 1:37.25 total make -j24 FOO=0.4 1132.18s user 59.94s system 1226% cpu 1:37.18 total make -j24 FOO=0.5 1069.59s user 59.70s system 1211% cpu 1:33.22 total make -j24 FOO=0.5 1070.84s user 60.06s system 1211% cpu 1:33.34 total make -j24 FOO=0.5 1070.93s user 59.86s system 1210% cpu 1:33.43 total make -j24 FOO=1.0 845.92s user 61.24s system 1126% cpu 1:20.55 total make -j24 FOO=1.0 847.92s user 61.82s system 1130% cpu 1:20.46 total make -j24 FOO=1.0 846.59s user 61.46s system 1133% cpu 1:20.10 total make -j24 FOO=2.0 678.14s user 68.64s system 1044% cpu 1:11.52 total make -j24 FOO=2.0 678.04s user 69.19s system 1042% cpu 1:11.64 total make -j24 FOO=2.0 677.66s user 68.24s system 1041% cpu 1:11.59 total make -j24 FOO=3.0 677.50s user 69.38s system 1047% cpu 1:11.28 total make -j24 FOO=3.0 677.42s user 68.43s system 1047% cpu 1:11.19 total make -j24 FOO=3.0 677.98s user 69.10s system 1044% cpu 1:11.50 total make -j24 FOO=4.0 677.43s user 68.58s system 1051% cpu 1:10.96 total make -j24 FOO=4.0 677.09s user 68.49s system 1056% cpu 1:10.57 total make -j24 FOO=4.0 677.60s user 69.23s system 1049% cpu 1:11.17 total make -j24 FOO=5.0 677.22s user 68.90s system 1043% cpu 1:11.52 total make -j24 FOO=5.0 677.47s user 68.91s system 1044% cpu 1:11.49 total make -j24 FOO=5.0 677.13s user 67.98s system 1049% cpu 1:10.98 total make -j24 FOO=7.0 678.21s user 68.57s system 1044% cpu 1:11.52 total make -j24 FOO=7.0 677.48s user 68.50s system 1044% cpu 1:11.42 total make -j24 FOO=7.0 677.95s user 68.25s system 1050% cpu 1:11.00 total make -j24 FOO=10.0 677.30s user 69.52s system 1045% cpu 1:11.45 total make -j24 FOO=10.0 678.18s user 68.55s system 1042% cpu 1:11.62 total make -j24 FOO=10.0 678.97s user 68.45s system 1043% cpu 1:11.64 total make -j24 FOO=20.0 677.99s user 68.42s system 1041% cpu 1:11.67 total make -j24 FOO=20.0 677.69s user 69.31s system 1046% cpu 1:11.36 total make -j24 FOO=20.0 677.89s user 68.70s system 1045% cpu 1:11.39 total Clearly for this test, the default (0.1) results in too low a threshold for best performance and thus too much time spent in the GC. We reach a plateau around percentage=2.0. 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. Stefan