How to disable/limit pixmap cache in X

Eirik Byrkjeflot Anonsen eirik at opera.com
Thu Sep 20 00:48:49 PDT 2007


Carsten Haitzler (The Rasterman) <raster at rasterman.com> writes:

> On Thu, 20 Sep 2007 02:18:25 +0300 Daniel Stone <daniel at fooishbar.org> babbled:
>
>> On Wed, Sep 19, 2007 at 08:50:20PM +0100, Glynn Clements wrote:
>> > It appears that Jim is willing to sacrifice the client for the sake of
>> > the whole. In that regard, the server should probably be making a bit
>> > more effort to better handle out-of-memory situations. Unfortunately,
>> > that's easier said than done, as it can't reliably tell how much
>> > "headroom" it's going to need.
>> 
>> On systems with overcommit (i.e., all of them), there's no way to tell.
>
> tune that sucker off :) (overcommit)
>
> echo 2 > /proc/sys/vm/overcommit_memory
>

I remember experimenting with this on the sharp zaurus a few years
ago.  While it (probably) turned off overcommit, it still usually
ended up with the oom killer triggering rather than failing memory
allocations.  But maybe this has improved since then.

I guess the oom killer is hard to avoid in the general case.  If a
"memory-safe" application eats up all the memory, the system might
find itself unable to do anything useful as no programs are able to
allocate any memory any more.  In practice, this can probably be
solved by not triggering the oom killer until the biggest memory hogs
have had a chance at releasing some memory.

(On the zaurus it also made the system extremely slow when closing in
on the memory limit.  Probably due to very few pages left for
non-dirty pages.  But that may have been a side effect of the highly
aggressive memory settings on that device.)

eirik



More information about the xorg mailing list