X Server: abused or buggy?
ofv at wanadoo.es
Tue Dec 9 08:01:53 PST 2008
Lubos Lunak <l.lunak at suse.cz> writes:
> On Tuesday 09 of December 2008, Óscar Fuentes wrote:
>> After observing how X used 1.3 GB of RAM, some investigation revealed
>> that certain application (Okular, a document viewer,
>> http://okular.kde.org) was causing this memory consumption. It is
>> creating lots of pixmaps as a way for caching document pages. Opening a
>> pdf file an scrolling through its pages makes X memory usage grow in the
>> hundreds of MB. After Okular is closed, usually X returns the memory to
>> the OS. But not always, sometimes retains some dozens of MB.
>> Is this considered a bug on the X server, or is it being abused by the
> Neither. Pixmaps created by applications are normally stored in the X
> server, and in this specific case this optimization is a feature and
> can be configured in Okular's configuration.
Setting Okular to "Low memory usage" mode just makes X's memory grow
more slowly, but it keeps growing.
> Moreover I'd assume that you interpret memory usage numbers incorrectly
> (simply because almost everyone does). I suggest to use the 'xrestop' tool to
> check how X resources are used by applications and find some good explanation
> of numbers reported by 'top', 'free' or whatever tool you used.
Okay, just re-read some technical explanation of memory reporting tools
 and it confirmed that X indeed is using that memory. But this is
much simpler: if `top' says that X is using 2 GB of RES memory on a 4 GB
machine, plus some other app leaving 1.5 GB "free" RAM, can we assume
that the system is as responsive as if X were using 100 MB of RAM
leaving 3.4 GB of "free" RAM, when we do a `make -j4' for building some
big C++ framework?
> If you can still confirm an unreasonable memory usage afterwards, you
> can report a bug at http://bugs.kde.org .
Done. Maintainer says that he doesn't care 'cause it is an Xorg problem.
More information about the xorg