From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.devel Subject: Re: Debugging emacs memory management Date: Sun, 15 Feb 2015 12:28:33 -0800 Message-ID: <87d25a52wf.fsf@secretsauce.net> References: <87zj8l3r32.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424032568 30099 80.91.229.3 (15 Feb 2015 20:36:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Feb 2015 20:36:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 15 21:35:58 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YN5v2-0007lX-Gp for ged-emacs-devel@m.gmane.org; Sun, 15 Feb 2015 21:35:56 +0100 Original-Received: from localhost ([::1]:36547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN5v1-0003TV-Qr for ged-emacs-devel@m.gmane.org; Sun, 15 Feb 2015 15:35:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN5uj-0003TI-2x for emacs-devel@gnu.org; Sun, 15 Feb 2015 15:35:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YN5ud-0008Oo-W9 for emacs-devel@gnu.org; Sun, 15 Feb 2015 15:35:36 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:41726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YN5ud-0008OK-Mq for emacs-devel@gnu.org; Sun, 15 Feb 2015 15:35:31 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9249D20A22 for ; Sun, 15 Feb 2015 15:35:29 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sun, 15 Feb 2015 15:35:29 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:cc:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=q+3EbE+nRPvG9fDcpijS7X68qSA=; b=ACyn6yEMLLD67AbXM4IG RDz9/OPECWLkZv/sgnMU+MysuggTYiQMS2DUdGifzaGg/GvJM2YdV/HtvHxx+Rst dC6WuTQR/9XtHEyG4k1fYxiWhqxGllyj3tX8YcUPoEYLeWSr7ssENq4nRRiuGL6I gqavDqaMEdcRJuB9rvVSZOU= X-Sasl-enc: adcHqAN+lNQIU+QIdRtOzQerPFIF37uLshIYgLYbKn42 1424032529 Original-Received: from shorty.local (unknown [76.91.145.213]) by mail.messagingengine.com (Postfix) with ESMTPA id A2B65C00295; Sun, 15 Feb 2015 15:35:29 -0500 (EST) Original-Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1YN5ub-0006wA-1D; Sun, 15 Feb 2015 12:35:29 -0800 In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 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:183122 Archived-At: Stefan Monnier writes: > Have you tried `memory-usage' (available from a GNU ELPA near you)? This was useful; thanks for the suggestion. My current emacs session has been running for 4 days. The OS ways that it's usinng 1143MB of RAM. This is too much, and will keep growing quickly with time. (memory-usage) says Garbage collection stats: ((conses 16 1059730 177764) (symbols 48 58721 0) (miscs 40 18919 13229) (strings 32 168864 83786) (string-bytes 1 5968100) (vectors 16 90041) (vector-slots 8 2368533 70421) (floats 8 1302 1671) (intervals 56 94677 4911) (buffers 976 375) (heap 1024 1257157 52692)) => 16.2MB (+ 2.71MB dead) in conses 2.69MB (+ 0.00kB dead) in symbols 739kB (+ 517kB dead) in miscs 5.15MB (+ 2.56MB dead) in strings 5.69MB in string-bytes 1.37MB in vectors 18.1MB (+ 550kB dead) in vector-slots 10.2kB (+ 13.1kB dead) in floats 5.06MB (+ 269kB dead) in intervals 357kB in buffers 1.20GB (+ 51.5MB dead) in heap Total in lisp objects: 1.31GB (live 1.25GB, dead 58.0MB) Buffer ralloc memory usage: 122 buffers 37.6MB total (64.9kB in gaps) ... No significant difference is observed when I (garbage-collect). It looks like the bulk of the memory is in the "heap". Is this meaningful to anybody? Any insight greatly appreciated.