From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nix Newsgroups: gmane.emacs.devel Subject: Re: Emacs bzr memory footprint Date: Thu, 20 Oct 2011 14:35:31 +0100 Message-ID: <87sjmnrdjw.fsf@spindle.srvr.nix> References: <83fwix2osa.fsf@gnu.org> <0B3EE7A4-D0D6-4D1E-ADC4-0BEE68F179B2@mit.edu> <87fwivwp37.fsf@turtle.gmx.de> <87sjmvpmd2.fsf@lifelogs.com> <87aa93wmc4.fsf@turtle.gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319117767 17556 80.91.229.12 (20 Oct 2011 13:36:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2011 13:36:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sven Joachim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 20 15:36:03 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RGsmw-00052b-2f for ged-emacs-devel@m.gmane.org; Thu, 20 Oct 2011 15:36:02 +0200 Original-Received: from localhost ([::1]:50428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsmv-00021f-39 for ged-emacs-devel@m.gmane.org; Thu, 20 Oct 2011 09:36:01 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:53833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsmp-000218-22 for emacs-devel@gnu.org; Thu, 20 Oct 2011 09:35:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGsmb-00047Q-Cx for emacs-devel@gnu.org; Thu, 20 Oct 2011 09:35:54 -0400 Original-Received: from icebox.esperi.org.uk ([81.187.191.129]:46669 helo=mail.esperi.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsmb-00046S-4H for emacs-devel@gnu.org; Thu, 20 Oct 2011 09:35:41 -0400 Original-Received: from esperi.org.uk (nix@spindle.srvr.nix [192.168.14.15]) by mail.esperi.org.uk (8.14.5/8.14.5) with ESMTP id p9KDZVcM008391; Thu, 20 Oct 2011 14:35:31 +0100 Original-Received: (from nix@localhost) by esperi.org.uk (8.14.5/8.14.5/Submit) id p9KDZVIw023219; Thu, 20 Oct 2011 14:35:31 +0100 Emacs: the answer to the world surplus of CPU cycles. In-Reply-To: <87aa93wmc4.fsf@turtle.gmx.de> (Sven Joachim's message of "Fri, 14 Oct 2011 18:48:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-DCC-wuwien-Metrics: spindle 1290; Body=2 Fuz1=2 Fuz2=2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 81.187.191.129 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145363 Archived-At: On 14 Oct 2011, Sven Joachim said: > On 2011-10-14 18:30 +0200, Ted Zlatanov wrote: > >> On Fri, 14 Oct 2011 17:49:16 +0200 Sven Joachim wrote: >> >> SJ> I'm also experiencing memory leaks. My current session is at 82M, with >> SJ> the accumulated size of all buffers less than 1M; visiting files and >> SJ> then deleting their buffers does not increase memory footprint, but Gnus >> SJ> usage (visiting groups and articles) slowly but steadily does. >> >> It's possible GnuTLS usage is part of the problem. Do you use it? > > Yes. So do I. Here are two Emacses (quite old, I'm afraid, bzr 105407, must upgrade): STIME RSS VSZ Oct07 832348 1127088 Oct07 226916 499588 The first Emacs does little but run Gnus and BBDB, including a bunch of gnutls-accessed IMAP mailboxes at my employer's (Drew can probably tell you *exactly* how that works, even if I use Gnus to access them and he doesn't), but also including nnml and a bunch of ordinary nntp groups on multiple servers. No images, no multicharset stuff except whatever I run across on emacs-devel :) The second Emacs does no Gnus, but does *all* my software development, my entire day job, and is much more heavily used, with far more active buffers, including monsters like a TAGS file for the entire Linux kernel. Yet its memory consumption is far lower. They have identical configurations otherwise. (garbage-collect) for the first: ((2118391 . 1218350) (83106 . 0) (80362 . 45727) 87827825 2736712 (7831 . 20893) (94543 . 15062) (461420 . 158890)) For the second: ((1362224 . 894226) (51114 . 79) (17329 . 6290) 9620209 952486 (747 . 4077) (84546 . 5233) (336029 . 181268)) Gnus is clearly driving Emacs much harder than mere cc-mode ever does. I'm particularly stunned by the number of string-chars in use. It must have some huge variables defined, probably holding overview data or something... I'm not sure how large some of those things are: if they're large structures this might explain most or all of the memory consumption.