From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Cloos Newsgroups: gmane.emacs.devel Subject: Re: Emacs bzr memory footprint Date: Fri, 14 Oct 2011 14:13:27 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318616061 14786 80.91.229.12 (14 Oct 2011 18:14:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2011 18:14:21 +0000 (UTC) Cc: Emacs developers To: Carsten Mattner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 14 20:14:17 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 1REmGu-0002Mr-NA for ged-emacs-devel@m.gmane.org; Fri, 14 Oct 2011 20:14:16 +0200 Original-Received: from localhost ([::1]:47383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REmGo-00087f-Js for ged-emacs-devel@m.gmane.org; Fri, 14 Oct 2011 14:14:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REmGl-00086y-T6 for emacs-devel@gnu.org; Fri, 14 Oct 2011 14:14:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1REmGk-0004EK-Bt for emacs-devel@gnu.org; Fri, 14 Oct 2011 14:14:07 -0400 Original-Received: from eagle.jhcloos.com ([207.210.242.212]:37892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REmGk-0004EA-2G for emacs-devel@gnu.org; Fri, 14 Oct 2011 14:14:06 -0400 Original-Received: by eagle.jhcloos.com (Postfix, from userid 10) id C641B4014F; Fri, 14 Oct 2011 18:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jhcloos.com; s=eagle; t=1318616043; bh=2SAUeedSgZPmbs/zzIry/cKi5Dh7XhbVTXBik1FqBsg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=nPKHdNUYEQ2RDtvxrju/k0Y0IYwL/TPKu/ttXsSHxxAX8DlTu285cn8aemLcqqHoO p4BdgxiWDZe4yARSiQ7RLtROgKXRliIOWf/0UVnyZZQMhYYXuujDpt5Q2FvW5SL7ww Z5jF4n0ugw6uVWnMYriqzda682a5IuqyAeM5B1O0= Original-Received: by carbon.jhcloos.org (Postfix, from userid 500) id 2D6C1260042; Fri, 14 Oct 2011 18:13:27 +0000 (UTC) In-Reply-To: (Carsten Mattner's message of "Thu, 13 Oct 2011 11:24:25 +0200") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAACVBMVEX///8ZGXBQKKnCrDQ3 AAAAJElEQVQImWNgQAAXzwQg4SKASgAlXIEEiwsSIYBEcLaAtMEAADJnB+kKcKioAAAAAElFTkSu QmCC Copyright: Copyright 2011 James Cloos OpenPGP: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 Original-Lines: 37 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 207.210.242.212 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:145229 Archived-At: >>>>> "CM" == Carsten Mattner writes: CM> I've been wondering whether it's normal for Emacs to start with CM> 10 or 20 megs and stay at ~100 megs after opening and closing CM> multiple buffers. How many fonts do you have installed? In how many directories? fontconfig mmap(2)s every fc cache file, bloating the VM numbers. But those are read-only, so every app uses the same chunk of ram for each of those files, just like shared libraries. The gtk gui pulls in quite a few libraries. That also will bloat the VM numbers. You may also end up with several font files mmap(2)ed by fc. Again, read-only. Look at the output of: ;: lsof -p $(pgrep emacs) It should give you an idea of how many files are mmap(2)ed. On linux you also can look at /proc/$PID/maps. The BSDs also may support something like that. My emacs maps file has 656 entries. And that is with the (lighter-weight) athena toolkit. One third of those mmap(2)ed files are fontconfig cache files. (Note that, for the typical library, the elf sections -- such as data, rodata, text, etc -- are separately mmap(2)ed. So there will be three to four times as many library lines in maps as libraries loaded.) -JimC -- James Cloos OpenPGP: 1024D/ED7DAEA6