Bug 76710 - Huge memory footprint and huge memory leaks
Huge memory footprint and huge memory leaks
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: Xft (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Owen Taylor
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-25 05:09 EDT by jfm2
Modified: 2008-05-01 11:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-11-19 04:12:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jfm2 2002-10-25 05:09:23 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
In one of my boxes (installed as works station) gnome terminal eats one of more
meg of memory (DRS ie not sharable) each time I do a ps axv on it.  If I create
a tab it eats some 6 more megs of meory and oes not realease it if I destroy it.
 And that on a base who is already huge for a mere terminal emulator (18 megs of
DRS).
<p>
I have another box (installed with hthe "everything" option) where
gnome-terminal uses 17 megs of DRS when started but memory footprint remains the
same.
<p>
The first box is using 16 bit color depth and the second 24 bit color 
depth


Version-Release number of selected component (if applicable):


How reproducible:
Sometimes

Steps to Reproduce:
1.On the "right" box memory leaks are 100% reproducible
2.On every box the unordinate memory footprint is 100% reproducible
3.
	

Additional info:
Comment 1 Havoc Pennington 2002-10-25 11:12:34 EDT
This is caused by a memory leak in Xft on X servers without the "render"
extension. It will work fine on X servers that have render.
Comment 2 jfm2 2002-10-28 14:50:08 EST
Right.  But even in the box where gnome-terminal works it still eats something 
like 20 megs of memory.  And I don't use anything fancy like transparent 
backgrounds.
<p>
20 megs for a mere terminal emulator is a bug don't you think?
Comment 3 Havoc Pennington 2002-10-28 15:20:51 EST
It depends on your setup. My gnome-terminal processes have something like 5392K 
used of which 3492K is shared. But I have only one terminal window per 
gnome-terminal process because I use --disable-factory.

Each terminal tab or window will add the scrollback buffer size to your footprint.
Note that all terminal windows are in the same process by default.
Check your scrollback buffer size in prefs.
Comment 4 jfm2 2002-11-03 13:37:29 EST
I was using the _default_ parms like shipped by Redhat and with only the initial
tab.   IMHO if a mere terminal emulator eats nearly twenty megs with default
parms then it is a bug either in the program or in the fact those parms are
deafult.  Also I have problems envisionning what additional functionality a mere
terminal emulator could provide me whose value is worth 15 additional megs
(respactive to --nofactory) of memory use.  I know memory is cheap nowadays but
my 128M box is not worth to be upgraded and I will have to cope with it for an
additional year. :-)
Comment 5 Havoc Pennington 2002-11-03 14:00:03 EST
Any defaults can use unlimited RAM, it has to do with how many windows/tabs you
open. How many do you have open when you see that much memory usage?

The primary factors in mem usage will be number of windows, and scrollback
buffer size. The default scrollback size is IMO reasonable. Number of
windows/tabs, we have no control over.
Comment 6 jfm2 2002-11-03 15:24:09 EST
No tab or window but the implicit one.  It is on a fresh gome-terminal from a
fresh session from a freshly rebooted machine (ie there are no old terminals
hanging around who could confuse me).
Comment 7 Havoc Pennington 2002-11-03 16:02:35 EST
My terminal isn't close to 20M in that situation, there's something weird going on.
Comment 8 jfm2 2002-11-03 16:24:19 EST
Perhaps it is because I made an "everything" installation.   Thus I probable I
still have fonts for exotic languages and perhaps gnome-terminal has loaded them
all.  Of course it should not load unneeded fonts 

BTW IMHO anaconda should be smarter about the "everything" installation:  some
people like myself could want all the software but that does not mean we want
man pages in finnish and chinese fonts: it should install only the docs and
fonts required for the languages selected by the user.

Returning to our subject perhaps it is related to color depth (24bpp) or the NV
driver used by my NVidia card (I use the vanilla one shipped by RedHat).

Since I have ADSL I can send you any core file/strace/ltrace output you require
Comment 9 jfm2 2002-11-19 04:11:19 EST
I have found that the output of ps is misleading.  Not only it does not properly
account for shared memory but sometimes I have found that total memory used by
system was X mags (with zero pages in swap used) while a _single_ program had a
DRS far superior to X.  Looks like all of shared libraries are mapped into DRS
even when using only a liitle part of them (I thougt they were mapped into the
text segment).
<p>
That means apparent memory consumption of gnome-terminal (in normal case not
when hitting the memory leaks on lack of RENDER extension) is not as high as it
looks.
I think we can close this bug. 
Comment 10 Havoc Pennington 2002-11-20 14:32:36 EST
"top" and "gnome-system-monitor" give more heuristic memory usage output, 
that may be more in line with what one expects.

Closing then, thanks.

Note You need to log in before you can comment on or make changes to this bug.