Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Debug memory leaks in X server
Date: Mon, 26 Nov 2012 16:05:25
Message-Id: 50B392EE.5040604@gmail.com
In Reply to: Re: [gentoo-user] Debug memory leaks in X server by Mick
1 Mick wrote:
2 > On Monday 26 Nov 2012 12:43:38 Dale wrote:
3 >> Mick wrote:
4 >>> On Monday 26 Nov 2012 09:56:27 Florian Philipp wrote:
5 >>>> Hi list!
6 >>>>
7 >>>> I have a suspicion that viewing certain PDFs in okular causes X server
8 >>>> to leak memory. Currently it is using 1.8 GB after 3 days uptime. Has
9 >>>> anyone else observed that? Is there a way to inspect X server's memory
10 >>>> usage?
11 >>> I have noticed that okular recently started breaking into a sweat when it
12 >>> renders pdf files. Even a four page document with a bit of colour and
13 >>>
14 >>> graphics seems to push the cpu:
15 >>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16 >>>
17 >>> 16387 michael 23 3 466m 52m 30m S 102 1.3 0:36.88
18 >>> /usr/bin/okular <<< SNIP >>>
19 >>>
20 >>> Once rendered, the CPU goes down to normal levels. The problem does not
21 >>> seem to occur when the pdf is just text, i.e. no photographs, or complex
22 >>> graphics in it.
23 >>>
24 >>> Other than the various top apps, perhaps you can try lsof?
25 >> I have a local grocery store that I have to go to the website to get
26 >> their sale ads. Anyway, it is generally 2 pages and even on this 4 core
27 >> rig with more than plenty of ram, it takes a bit to open them. Funny
28 >> thing is, I have some that is about sewing, lots of pictures in those
29 >> since I need pics to get the idea, anyway, they load up in a flash. As
30 >> soon as Okular loads, the pages are there.
31 >>
32 >> Since this is more like what Florian describes, I guess we see the same
33 >> things. I'm not sure about ram itself but some files do open
34 >> differently. By the way, the grocery ad is a much smaller file than the
35 >> sewing files. Both in file size and number of pages. One would expect
36 >> it to be the opposite.
37 >>
38 >> Looks like I have a problem that I didn't know I had. With 16Gbs of
39 >> ram, I hadn't noticed anything with the ram, other than Seamonkey being
40 >> its usual hoggy self. :/ I guess this is to sort of confirm that
41 >> someone else sees a similar thing to Florian.
42 > This is not a RAM issue, but seemingly a CPU issue. Furthermore, it does not
43 > seem to be related exclusively to okular. I just tried qpdfview and it also
44 > took ages to open/render - HOWEVER - when I tried mupdf it was rendered in
45 > milliseconds and the CPU usage stayed very very low. This may be something to
46 > do with the wonderful KDE and friends.
47 >
48 > I recently upgraded to KDE-4.9.3 and this is not the only thing I noticed. In
49 > Kmail-1.13.7 all sent messages are saved in the local/sent-mail directory,
50 > irrespective of the path I enter in Kmail's settings for each email account.
51 > Initially I though that sent messages were being lost - not sent - but then I
52 > noticed that the default sent folder started getting larger.
53 >
54 > I better start another thread for this problem.
55
56 That was mostly my point but I seemed to have glossed over the CPU part
57 after rereading my post. My point was, ram is not a issue because I
58 have lots of it. The subject mentions memory so I mostly went to it
59 instead of the CPU. Even with that much ram, it takes a long time to
60 load, at least for some files. It seems to be a CPU thing, not a memory
61 thing. Maybe Florian knows something we don't know at this point.
62
63 I don't know the exact percentages but I usually max out at least one
64 core when I open the grocery ad. The sewing files, although larger,
65 open faster. I just wonder what is used to make one as opposed to the
66 other? Maybe that is the difference.
67
68 Dale
69
70 :-) :-)
71
72 --
73 I am only responsible for what I said ... Not for what you understood or how you interpreted my words!