Bug 209591 - Large, persistent X virtual memory usage
Summary: Large, persistent X virtual memory usage
Status: RESOLVED DUPLICATE of bug 177213
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 04:10 UTC by Benoît Jacob
Modified: 2009-10-06 16:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benoît Jacob 2009-10-06 04:10:55 UTC
Version:            (using Devel)
Compiler:          gcc 4.4 
OS:                Linux
Installed from:    Compiled sources

Hi,

I am not even sure that the following is a bug, but I thought that I'd report it to you, so you decide.


Summary:

I ran 'top' and monitored the VIRT column for X. I understand that this is a completely broken way to measure memory usage. However, by just using Okular to view a PDF file at 400% zoom level, I was able to make that number go from 328M to 1500M. At 100% zoom, I still got 750M. This is on a machine with 1G RAM + 1.5G swap. Is is normal that this VIRT column for X would show such a large number as 1500M ? The system did feel a bit slower, but didn't crawl. Quitting Okular resulted in intense swapping for a few seconds.


To reproduce:
* launch 'top' in a terminal, note the VIRT value for X
* wget http://www.jmilne.org/math/CourseNotes/LEC.pdf
* okular LEC.pdf
* Zoom to 400%. That's not necessary, but makes the "problem" worse.
* Hit "next page" every time it has finished rendering
* Iterate over a few dozen pages
* Check back in "top" the VIRT column for X. I got it as high as 1500M
* Quit okular. The system swaps for a few seconds. The X memory usage stays the same.
* If you kill X and restart with XPDF instead, the X memory usage doesn't seem to significantly increase.


Assuming that this is indeed not wanted behavior, here's some further info:
* It's not specific to PDF, I got the same with DVI
* At a Zoom level of 100%, I obtained a X (VIRT) memory usage of 750M. At 200% zoom, I got 1100M.
* In 'xrestop', the okular pixmap memory usage may climb up to 100-200M sometimes, but not more, and eventually falls back to a low value. So this means that this isn't a pixmap leak, right?
Comment 1 Albert Astals Cid 2009-10-06 10:04:26 UTC
Yes, we use X memory to cache rendering results, if X doesn't recover his memory after we stop using it, i think you'll agree it is X fault not ours. If you can provide evidence we are not freeing all the QPixmaps we crate we will be happy to investigate.

Basically this bug is duplicate from the others that complain about X memory usage, don't have to find them right now.
Comment 2 Benoît Jacob 2009-10-06 14:09:28 UTC
Sure, I understand.

As I said at the bottom, it really seems that Okular _IS_ freeing all the pixmaps that it uses.

I was just wondering if Okular did anything wrong, to get X to use as much as 1500M memory. If it's just a X bug, so be it.

Feel free to close as invalid.
Comment 3 Pino Toscano 2009-10-06 16:52:48 UTC

*** This bug has been marked as a duplicate of bug 177213 ***