Bug 339313 - Opening PDF results in 36.5% of my 8gb memory used
Summary: Opening PDF results in 36.5% of my 8gb memory used
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.20.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL: https://mirror.explodie.org/texts/afr...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-22 22:24 UTC by Aranjedeath
Modified: 2014-09-24 21:27 UTC (History)
2 users (show)

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 Aranjedeath 2014-09-22 22:24:13 UTC
I open the linked PDF, cpu usage skyrockets (I'm going to ignore this for now and assume it's "rendering" the PDF), and memory usage climbs to 36.5% of my total ram within seconds. 

memory usage is whatever htop uses for "% ram used". 

Reproducible: Always

Steps to Reproduce:
1. open htop with filter for "okular"
2. open pdf
3. profit

Actual Results:  
Massive memory usage.

Expected Results:  
Some ram used, maybe even 100mb or 500mb, but not 3gb.

I'm rating this as normal, but this would brick some computers (due to distro maintainers compiling out oomkiller).
Comment 1 Luigi Toscano 2014-09-22 22:33:21 UTC
Do you have some specific settings in your okular configuration? Can you try with a different user? 
Is the "normal" package from Debian testing?

I just tried here (up-to-date Debian testing as well, same 0.20.0, poppler 0.26.4) and I see this as ps auxw:

prova    16435  5.5  1.5 647840 125244 pts/14  S+   00:30   0:02 okular https://mirror.explodie.org/texts/africa-global-politics-pan_african-perspective.pdf

RSS is definitely acceptable (less than 200MB)
Comment 2 Aranjedeath 2014-09-22 22:42:40 UTC
Yes, using distribution standard everything. I don't know what popplar is, I'm using 0.20.0, with kde 4.14.1.

Very interesting. I just went through the settings and it says somehow I've got the performance memory usage setting on "greedy" not "normal". Not sure how that happened. When reset to "normal" it only uses 1.6% memory.

dorotea  26112 35.2 35.0 3414088 2874404 ?     Sl   15:39   0:47 /usr/bin/okular
vs
dorotea  25918  1.5  1.6 682444 131740 ?       S    15:37   0:01 /usr/bin/okular

also it takes a full 1 minute for the ram to max out at 36.5% used. 

Hmm. Maybe this is my fault, then? But still that's a lot of ram to use.
Comment 3 Albert Astals Cid 2014-09-23 19:42:17 UTC
I am not sure i understand you.

You told okular to be greedy with memory use and now you're opening a bug because it's greedy?
Comment 4 Aranjedeath 2014-09-24 02:37:48 UTC
I don't remember setting it that way, but sure I'll allow your premise.

Yes. Opening more than 1 pdf, or (for example) having chrome open on any normal computer (simultaneously) seems pretty likely to result in an OOM scenario, in which Okular would be at fault for causing. Because most debian based linux distributions (ubuntu et all, I'm getting at user-count on desktop here, not some other finer detail) compile out the OOMkiller feature from their kernels, there's nothing a regular user can do but sit while their computer is locked up. Talk about a horrendous user experience. 

I suppose my wishlist feature is that this become more intelligent, and not screw over users if it can be avoided.
Comment 5 Albert Astals Cid 2014-09-24 21:27:26 UTC
You set a memory mode that says clearly in the docu that will use up to 50% of your ram, you can't complain is using 37% of it.