X memory usage?

Mike A. Harris mharris at mharris.ca
Tue Jul 25 07:37:14 UTC 2006


Kevin DeKorte wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Matthew Miller wrote:
>> On Fri, Jul 21, 2006 at 10:08:11AM -0600, Kevin DeKorte wrote:
>>> Restarting the machine and loading the same working set and just using
>>> metacity (composite still enabled) the VIRT RAM usuge is still high.
>>> I'll try later with composite disabled.
>>>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>>>  2297 root      15   0  441m  43m  11m R  5.6  4.3   0:59.47 Xorg
>> How much video ram does your card have? That's *included* in the number
>> you're looking at.
>>
> 
> I have an i915GM video card (i810 driver) that is one of those shared
> memory cards. I have an option set in xorg.conf to give is 128MB of
> video RAM.
> 
> grep -i RAM /etc/X11/xorg.conf
>         VideoRam    131072

The X server itself uses little memory.  The output of top/ps includes
that, plus video memory, plus memory mapped I/O regions, video BIOS,
etc.

Applications allocate pixmaps which are stored in the X server, so if
you run applications such as firefox/mozilla or other apps that allocate
lots of pixmaps, these applications will cause the X server's memory
footprint to increase dramatically.  If the application leaks pixmaps,
the memory leak will be seen in the X server, not in firefox et al.
while the _bug_ is in the app.  Once an app is killed however, the
majority of the X resource memory usage should shrink.

As a result, most of the time when a user sees the X server with high
memory usage and thinks X is bloated and leaky, the truth is that some
application such as firefox/thunderbird/evolution/nautilus or something
else is bloated and/or leaky.  ;o)

On a side note, I would recommend lowering the VideoRAM setting and
seeing if you notice any difference whatsoever in performance of any
apps (2D or 3D).  In general, X does not take full advantage of all
of the memory in any video card, so allocating extra system memory
to video in UMA systems like Intel graphics chipsets is likely to just
waste lots of system ram which could be improving overall system
performance acting as disk cache, etc.




-- 
Mike A. Harris  *  Open Source Advocate  *  http://mharris.ca
                       Proud Canadian.




More information about the test mailing list