This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Need help hunting down the cause for my high memory usage

Tags: None
(comma "," separated)
barghest
Registered Member
Posts
48
Karma
0
OS
Hi,

I'd like to open a bug report but I don't have the necessary informations and kindly ask for your help to reproduce the problem for a helpful bug report.

What happens? When using KDE after a while X starts to consume more and more memory.

In addition even with a lot of free RAM the swap slowly becomes full which renders my system slow and useless.

xrestop shows that plasma-desktop and kwin consume the most memory. I have a feeling that this mainly happens when using okular.

I already searched the bug tracker but I only found the hint to disable strigi but I don't have it running.

I'm using KDE 4.5.3 and nvidia 260.19.21

Please let me know how to find out what causes the problem.

Thanks in advance for your help!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You can use Alt + Shift + F12 to temporarily disable compositing to see if that has any effect. Can you please post the memory usage figures from xrestop?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
thof
Registered Member
Posts
2
Karma
0
OS
I'm Arch user too and I have the same problem (memory leaks). It seems that it only occurs with new nvidia driver (260.19.21), because I've just tested KDE with nouveau (for 2h) and everything worked fine.
I noticed that with enabled desktop effects, memory consumption immediately increases after 0,5h and without these effects it takes almost 1,5h.
First, I can notice that windows draw much longer than at the beginning (about 2 sec) while CPU usage jumps to 100%. After an hour from now Xorg process can take 80% of total memory!
What more I can't find any relevant logs... Here http://pastebin.com/J8vfLLrv you can find list of processes that might be useful.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Given that this only occurs with the NVidia driver, it is probably a bug in the NVidia driver.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
barghest
Registered Member
Posts
48
Karma
0
OS
I've set the graphics system to raster and disbaled direct rendering (caused flickering) and the memory consumption is way better now.
thof
Registered Member
Posts
2
Karma
0
OS
Several days ago I've updated kernel26 (2.6.35.8-1 -> 2.6.36.1-3) and a few X related packages: mesa (7.8.2-3 -> 7.9-1), xorg-server-common (1.9.2-1 -> 1.9.2-2), xorg-server (1.9.2-1 -> 1.9.2-2), libdrm (2.4.21-2 -> 2.4.22-1), nvidia (260.19.21-1 -> 260.19.21-2) and it seems that Xorg process doesn't leak anymore :) I didn't change anything with graphic or nvidia driver.
anutosho
Registered Member
Posts
23
Karma
0
all nosense :)

Last edited by anutosho on Fri Aug 03, 2012 3:15 pm, edited 1 time in total.
User avatar
VaterGarp
Registered Member
Posts
39
Karma
0
OS
Now that this thread is alive again anyway:
does anybody (using Arch) still have these memory problems?

X starts with no more than 35 MB and slowly (but still too fast, if you ask me...) eats up to 1.6 GB (within just a few hours). Then my system becomes unusable and I restart KDE -> X with 35 MB, new game.
I'm using xorg 1.9.2-2, nvidia 260.19.29-1, but I can't say when exactly this leak began to show.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This leak is likely within the NVidia drivers. You can verify this using xrestop to ensure no KDE application is leaking pixmaps within X.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
VaterGarp
Registered Member
Posts
39
Karma
0
OS
Thank you.
As far as I understand xrestop, KDE applications seem to be fine.
plasma-desktop at the top of the list uses 35MB of pixmaps, kwin 15-19MB.

Is there a way to find out whether it is really the driver?
Or is the fact that no application seems to be the suspect enough to be sure that it's the Nvidia driver's fault?

I have to restart KDE every 3 to 4 hours. This is not very amusing.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This means that no application is holding resources in the X server, which means that the bug must be in X or a component of it. Given that many others use the same common parts of X that you also use, it is probable that the NVidia specific components are the cause of this. Another suspect could be an interaction between the versions of graphic related systems on your computer.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ChoK
Registered Member
Posts
4
Karma
0
OS
You can use "kdesu ksysguard" to view detailed memory info with the resources used by each library Xorg is calling, though in this case everything will be in [heap].

I have been affected by this bug (nvidia proprietary driver on arch/kdemod) for a year at least. I don't remember if It was in 4.3 or 4.4 though. The memory usage sometimes goes up suddenly (jump of 100M) with applications that display graphics (web browser, digikam, smplayer, okular). I tried playing with the TripleBuffer option in xorg.conf alas no effect. Same thing with refreshing the pixmap cache via nvidia-settings -a PixmapCache=0 && nvidia-settings -a PixmapCache=1, or deactivating the Blur effect.
I monitor this via conky to know if I should restart X though mine never use more than 500MB (I have 2G of RAM).

On the same computer I have ubuntu+compiz+nvidia but X memory usage never goes beyond 3% even when playing 1080p with smplayer) so I suppose it's related to the kwin/plasma-desktop and nvidia combo.
User avatar
VaterGarp
Registered Member
Posts
39
Karma
0
OS
That's an interesting stat KSysGuard is providing there.
You're right, it's more than 900 MB "Private Dirty" by [heap].

I recently got the feeling that this memory leak has got something to do with Xournal which I've been using for hours every day recently.
I'll look into that, but as you are having the same problem without Xournal (I guess), that might just be one of several applications/setups that trigger the problem, not the problem itself.
ChoK
Registered Member
Posts
4
Karma
0
OS
So I upgraded to kde 4.6 on Archlinux, the high memory usage seems still here (didn't run it long enough)
My system is a 9300M GS (256 MB of video memory maybe worth noting)
Nvidia driver 260.19.29
2GB of RAM
At the start of KDE, X RAM usage is around 2%

I successfully tracked down several causes of high memory usage :
Those were tested using 720p/1080p H264 videos with embedded .**** subtitles available [Removed by admin] and [Removed by admin]. I monitor the RAM usage with conky. Just start the video, go fullscreen, jump forward and backward a few times in the video, go back to normal size. Normally you just have to do this one or two times to see the X RAM usage jumping.

now the culprits that always trigger a jump in RAM usage :
- sheet kwin desktop effects : Xorg jumps from 2% to 5,5% usage
- choosing the different plasmoids on each desktop option : Xorg jumps from 2% to 7% usage
(having both makes Xorg uses about 8,5% iirc)

there are some options that trigger this behaviour only before a log out (I mean, you change the option, try the video --> jump in usage, log out, log back in, try the video --> no jump)
- changing or removing the launcher: lancelot -> kickoff or kickoff -> lancelot (I think changing anything on a panel will trigger this, but I didn't test this yet), jump from 2 to 5,5%
- changing kwin decoration: air-oxygen -> oxygen or oxygen -> air-oxygen (have to test with different decoration, transparency may have an effect), jump from 2 to 5,5%
- changing kwin scaling method: smooth -> accurate or accurate --> smooth, jump from 2 to 5,5%


Now can someone reproduce ? Also maybe the leak(s) is(are) unrelated to what I found. I didn't run the desktop long enough to be sure it's gone with the sheet desktop effect disabled and choosing the same set of plasmoids for each virtual desktops.

Last edited by bcooksley on Fri Jan 28, 2011 11:50 pm, edited 1 time in total.
Reason: Removed links to possible copyright violating content
matrs
Registered Member
Posts
17
Karma
0
OS
I have the same problem here. It isn't new, i think is here since kde 4.0.
My system is kde 4.4.5 , 2.6.32.26-175.fc12.x86_64 with nvidia driver 195.36.31 (9300GS)

I open a lot of okular windows regularly,firefox and use some windows effects like present windows and desktops, nothing more. After a time using desktop, X memory usage reported by ksysguard increases and can easily reach 1000 MB. According to xrestop, Pxm mem tab (almost equivalent to total tab) plasma desktop reports 25 MB and 15MB for kwin processes.Without desktop effects, that value decreases around 5 megas for both. Okular windows resport an average of 10 MB per pdf but when i close all okular windows, the memory resported by ksysguard still is high. It seems there isn't a problem with Pxm mem,
For me, it seems a problem of memory release, because this problem is presented when i use my desktop for a while but when i close programs it doesn't see reflected in X memory usage. For example, when I logout , and x server restarts, my desktop starts when all previously opened windows and X server consuming around 100 MB or something like that, it's far away from previous 600 MB with the same open windows


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]