unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: edouard.debry@gmail.com, 45705@debbugs.gnu.org
Subject: bug#45705: [feature/native-comp] Excessive memory consumption on windows 10
Date: Fri, 08 Jan 2021 22:02:38 +0000	[thread overview]
Message-ID: <xjfa6tjaxz5.fsf@sdf.org> (raw)
In-Reply-To: <83turrif53.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 08 Jan 2021 18:10:00 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: edouard.debry@gmail.com, 45705@debbugs.gnu.org
>> Date: Fri, 08 Jan 2021 15:50:28 +0000
>>
>> consumptions of few GiB is something I've seen more then once for long
>> standing sessions.  You might be right in this being a memory leak,
>> indeed I've no prove of that (I think we have none for the other
>> direction either).
>
> I'm not yet worried about memory leaks, I'm more worried that there's
> no memory leaks, and instead using libgccjit indeed requires such
> large memory amounts.  Are you sure this is not the case?

I see,

if we are interested in comparing the memory footprint of using shared
libraries for functions vs stock byte-code I think we can "statically"
compare two sessions after the startup.

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).

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.

Also if we want to see a positive side, multiple Emacs sessions will
share the majority the pages allocated for the shared libraries.

  Andrea





  reply	other threads:[~2021-01-08 22:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 20:48 bug#45705: [feature/native-comp] Excessive memory consumption on windows 10 Édouard Debry
2021-01-06 20:55 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-07 14:25   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-08 14:25   ` Eli Zaretskii
2021-01-08 15:50     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-08 16:10       ` Eli Zaretskii
2021-01-08 22:02         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-01-09  7:56           ` Eli Zaretskii
2021-01-09 10:55             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-09 11:55               ` Eli Zaretskii
2021-01-09 12:37                 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-01-09 17:26                   ` Kévin Le Gouguec
2021-01-09 19:41                     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjfa6tjaxz5.fsf@sdf.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=45705@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=edouard.debry@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).