Am 26.11.2012 10:56, schrieb Florian Philipp:
> Hi list!
> I have a suspicion that viewing certain PDFs in okular causes X server
> to leak memory. Currently it is using 1.8 GB after 3 days uptime. Has
> anyone else observed that? Is there a way to inspect X server's memory
> usage?
> Regards,
> Florian Philipp

Okay, I have now a better understanding of my memory issue (no clue
about Mick's CPU issue. Maybe you can post a link to a PDF to demonstrate?):

As it seems, Okular is abusing the X server to share pixmaps between
instances [1]. In theory, this reduces memory consumption and CPU time,
however, there are two issues:
a) Sometimes Okular is leaking allocations.
b) X cannot handle this usage pattern, sometimes leaks memory or cannot
deallocate it because of memory fragmentation [2].

Neither side seems to be willing to fix the issue. For now, my
workarounds will be:
- Playing around with Okular's memory settings to make the issue less
- Using frontswap and normal swap + high swappiness settings to swap out
the leaked memory.
- Looking for another PDF/djvu/ps viewer.

Maybe Wayland can handle the situation better in a few years.


BTW: Regarding my question for an X memory inspector: x11-misc/xrestop
is the answer.

Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to