1 |
Am 26.11.2012 10:56, schrieb Florian Philipp: |
2 |
> Hi list! |
3 |
> |
4 |
> I have a suspicion that viewing certain PDFs in okular causes X server |
5 |
> to leak memory. Currently it is using 1.8 GB after 3 days uptime. Has |
6 |
> anyone else observed that? Is there a way to inspect X server's memory |
7 |
> usage? |
8 |
> |
9 |
> Regards, |
10 |
> Florian Philipp |
11 |
|
12 |
Okay, I have now a better understanding of my memory issue (no clue |
13 |
about Mick's CPU issue. Maybe you can post a link to a PDF to demonstrate?): |
14 |
|
15 |
As it seems, Okular is abusing the X server to share pixmaps between |
16 |
instances [1]. In theory, this reduces memory consumption and CPU time, |
17 |
however, there are two issues: |
18 |
a) Sometimes Okular is leaking allocations. |
19 |
b) X cannot handle this usage pattern, sometimes leaks memory or cannot |
20 |
deallocate it because of memory fragmentation [2]. |
21 |
|
22 |
Neither side seems to be willing to fix the issue. For now, my |
23 |
workarounds will be: |
24 |
- Playing around with Okular's memory settings to make the issue less |
25 |
critical. |
26 |
- Using frontswap and normal swap + high swappiness settings to swap out |
27 |
the leaked memory. |
28 |
- Looking for another PDF/djvu/ps viewer. |
29 |
|
30 |
Maybe Wayland can handle the situation better in a few years. |
31 |
|
32 |
[1] https://bugs.kde.org/show_bug.cgi?id=177213 |
33 |
[2] https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/98783 |
34 |
|
35 |
BTW: Regarding my question for an X memory inspector: x11-misc/xrestop |
36 |
is the answer. |
37 |
|
38 |
Regards, |
39 |
Florian Philipp |