From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "T.V. Raman" Newsgroups: gmane.emacs.devel Subject: Memory Usage On Emacs 24 Lucid Linux: Date: Wed, 14 Mar 2012 10:13:20 -0700 Message-ID: References: <20318.22787.38879.789013@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1331745223 28248 80.91.229.3 (14 Mar 2012 17:13:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Mar 2012 17:13:43 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 14 18:13:41 2012 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 1S7rlW-00074u-OH for ged-emacs-devel@m.gmane.org; Wed, 14 Mar 2012 18:13:34 +0100 Original-Received: from localhost ([::1]:38028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7rlW-00078E-19 for ged-emacs-devel@m.gmane.org; Wed, 14 Mar 2012 13:13:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7rlS-00076o-Sy for emacs-devel@gnu.org; Wed, 14 Mar 2012 13:13:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7rlM-0001hz-6j for emacs-devel@gnu.org; Wed, 14 Mar 2012 13:13:30 -0400 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:46095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7rlL-0001hk-Tr for emacs-devel@gnu.org; Wed, 14 Mar 2012 13:13:24 -0400 Original-Received: by eaal1 with SMTP id l1so1244107eaa.0 for ; Wed, 14 Mar 2012 10:13:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=geCwhshLs6iky0MLv+LXMsdDavcTTb6lnif999veyT4=; b=JcqXbY0YynCuVJh5gPXl/nsCgerrkkgtusTMZx3Hq7JIIXLggwHez4Eswl9K8lQKgY Gv4s20kMXt9wSYG9A9C4af7OZr0avXb1+DdmDwFGfm5ILBKE7gOV/jCQt8VkPyuclRm4 J7JB3lrJlqfDxuwReeH9YNrrYlCGLfENufaKBGpkq7w0sR/2td80zLqO/P7wnXMjppWY EPKfdTePjRbsaLfzXxfzdAYHi5Uo750cplfeSlv5jPirMKak01l3DGp/VE+8zg4LDXld QIUO9kdQVCqo4eSh0klq/2sn6OLM98+1te813B5B3iBdCS6glHF9Z/O21UOYXLcDTW7w Mgng== Original-Received: by 10.50.158.227 with SMTP id wx3mr13219241igb.31.1331745201072; Wed, 14 Mar 2012 10:13:21 -0700 (PDT) Original-Received: by 10.231.168.212 with HTTP; Wed, 14 Mar 2012 10:13:20 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.169 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:149053 Archived-At: Stefan, You were spot on --- I had HISTSIZE set to infinity. This is a setting I have had for the last 6+ years at work, I'll append the shell configuration bits I was using to essentially have an infinitely long history. It worked correctly until about May 2011, which is when Emacs 24 built from git/bzr started displaying the memory leak behavior we have been discussing. I've removed these from my shell environemnt, and emacs 24 is running happily with my full emacs environment loaded. Below, I'll append the shell setup that caused the problem -- suspect just taking out histsize would have fixed it, but I'm showing the set up here because I believe it would be valuable for emacs folks who understand the bash interaction to come up with a simpler, cleaner way of doing this. export command_oriented_history=1 export history_control ignoredups shopt -s histappend export HISTSIZE=999999999 homeraman home/raman export TVR_SHELL_LOG=/home/raman/.jotlog/shell.log On 3/13/12, Stefan Monnier wrote: >> After running emacs -q -- and then M-x shell, I see all of the >> memory on the machine getting shewed up -- at least as reported >> by free. > > Aha! > >> Shell: emacs -q M-x shell M-x memory-usage > >> Garbage collection stats: >> ((54977 . 10205) (15045 . 0) (90 . 121) 417724 1000327014 (67 . 191) >> (117 . 161) (25648 . 1043)) > >> => 879632+163280 bytes in cons cells >> 722160+0 bytes in symbols >> 3600+4840 bytes in markers >> 1072+3056 bytes in floats >> 6552+9016 bytes in intervals >> 820736+33376 bytes in string headers >> 417724 bytes of string chars >> 417724 bytes of vector slots > >> Total bytes in lisp objects: 1003392058 (live 1003178490, dead 213568) > > OK, that's very helpful, it narrows it down a good deal. > Now, all we have to figure out is how on earth does "M-x shell" create > so many (or such large) vectors! > Could it be you have $HISTSIZE set to a really large number? > > > Stefan >