How to disable/limit pixmap cache in X
Jim Kronebusch
jim at winonacotter.org
Thu Sep 20 19:47:38 PDT 2007
On Fri, 21 Sep 2007 06:26:09 +0900, Carsten Haitzler (The Rasterman) wrote
> On Thu, 20 Sep 2007 10:02:32 -0500 "Jim Kronebusch" <jim at winonacotter.org>
> babbled:
>
> simple answer: no. it's impossible. how do you know how much ram x will need
> over its lifespan? you don't need the kernel to do such things. if you knew you
> will never need more than X MB then alloc X MB, actually touch all the pages
> pf that allocation to makes sure they have been paged in and allocated real
> pages, mlock() it in and from then on allocate all memory from this pool you
> created. but the main problem is - what is X? you just will never know.
Is the RAM the Xserver needs to run separate from what it needs to store pixmaps, or are
these inherently the same thing? If they are separate then I guess to me it would seem
safer to set a best guess of how much to set aside for the Xserver than do nothing at
all. But I don't really understand how this all actually works, so if you tell me this
is impossible than I have to trust you. Otherwise if there is a possibility to set this
on a best guess effort I could monitor usage over time and set the limit a certain
percentage higher.
Good news is I think Firefox is now going to have a patch to enable setting a limit on
pixmap storage soon and the developers actually say this is fairly trivial. Next I'll
work on OpenOffice and see if anything can happen there. I was just hoping for a way to
set limits in xorg as a sort of global protection from greedy Xclients, but I guess that
is a little bit of a pipe dream.
Jim
--
This message has been scanned for viruses and
dangerous content by the Cotter Technology
Department, and is believed to be clean.
More information about the xorg
mailing list