From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45705: [feature/native-comp] Excessive memory consumption on windows 10 Date: Sat, 09 Jan 2021 09:56:16 +0200 Message-ID: <83lfd2ilwf.fsf@gnu.org> References: <87y2h5hjve.fsf@gmail.com> <831revjyja.fsf@gnu.org> <83turrif53.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32464"; mail-complaints-to="usenet@ciao.gmane.io" Cc: edouard.debry@gmail.com, 45705@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 09 08:57:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ky97W-0008JU-NA for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 08:57:10 +0100 Original-Received: from localhost ([::1]:59942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ky97V-0005Uf-PF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 02:57:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ky97O-0005UF-Uh for bug-gnu-emacs@gnu.org; Sat, 09 Jan 2021 02:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ky97O-0005JA-Jg for bug-gnu-emacs@gnu.org; Sat, 09 Jan 2021 02:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ky97O-0003KJ-Hi for bug-gnu-emacs@gnu.org; Sat, 09 Jan 2021 02:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jan 2021 07:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45705 X-GNU-PR-Package: emacs Original-Received: via spool by 45705-submit@debbugs.gnu.org id=B45705.161017898512739 (code B ref 45705); Sat, 09 Jan 2021 07:57:02 +0000 Original-Received: (at 45705) by debbugs.gnu.org; 9 Jan 2021 07:56:25 +0000 Original-Received: from localhost ([127.0.0.1]:51174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ky96n-0003JP-2v for submit@debbugs.gnu.org; Sat, 09 Jan 2021 02:56:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ky96g-0003J5-KX for 45705@debbugs.gnu.org; Sat, 09 Jan 2021 02:56:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56212) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ky96a-0004vH-Ng; Sat, 09 Jan 2021 02:56:12 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2798 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ky96a-0003Zq-3O; Sat, 09 Jan 2021 02:56:12 -0500 In-Reply-To: (message from Andrea Corallo on Fri, 08 Jan 2021 22:02:38 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197537 Archived-At: > From: Andrea Corallo > Cc: edouard.debry@gmail.com, 45705@debbugs.gnu.org > Date: Fri, 08 Jan 2021 22:02:38 +0000 > > I've compiled current native-comp with and without --with-nativecomp > repeating the experiment with and without X. These are the data-points: > > | | --without-x | --without-x --with-nativecomp | | > |---------+-------------+-------------------------------+------| > | -Q | 49M | 92M | 1.9x | > | my-conf | 92M | 179M | 1.9x | > > > | | | --with-nativecomp | | > |---------+------+-------------------+------| > | -Q | 536M | 756M | 1.4x | > | my-conf | 585M | 1453M | 2.4x | > > So yes shared are using considerably more memory, I think this is > expected as also the file footprint suggests native code is less dense > that byte-code (actually with a quite similar relative results). Thanks for the data points. What about memory usage when there's a background compilation of Lisp going on? GCC is known to be a memory hog in some cases, so I wonder what happens in this case with libgccjit. (Do we allow multiple async compilations, btw? if so, how many concurrent compilations can be running, and how do we or the user control that?) Also, what are the numbers for a session that has been running for several days? I understand that it would be hard for you to collect such numbers about all the configurations, but could you show the growth of the configuration you are routinely using, which I presume is --with-x --with-nativecomp and with your config? As your numbers above show, it starts at 1.5 GiB, but what is the footprint after a day or a week? > Indeed *with use the delta should decay as data are the same and there's > no difference in its representation*, so this picture should be more on > the worst case side than on the average. That's why I asked to see the memory footprint after the session has run for some time, yes. > Also if we want to see a positive side, multiple Emacs sessions will > share the majority the pages allocated for the shared libraries. Assuming those sessions run the same binary of Emacs, yes. Otherwise, only some of them will be shared, the ones that are in common public directories, and even that only if the running Emacsen are of the same version. Most of the shared code is in the pdumper file, btw, which is outside of the picture for the purposes of this discussion. Thanks.