Kubuntu Jaunty KDE 4.2 very high memory usage

Bug #343714 reported by Musthafa Meeran
36
This bug affects 3 people
Affects Status Importance Assigned to Milestone
xserver-xorg-video-intel (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kdebase-workspace

Hi,
After upgrading to Jaunty from Intrepid, the general memory usage of KDE became very high and the memory usage keeps on growing with the the continuous run. I don't know why all the base applications occupy so high memory.

Opening kmail, konsole, firefox and eclipse alone causes memory swapping and the system becomes very slow.
It never happened in Intrepid with KDE 4.2.

$ lsb_release -rd
Description: Ubuntu jaunty (development branch)
Release: 9.04

$ uname -a
Linux <hostname> #31-Ubuntu SMP Wed Mar 11 15:43:58 UTC 2009 i686 GNU/Linux

The attachment shows the memory usage just after a few minutes of login.

Thanks a lot...

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: kdebase-workspace-bin 4:4.2.1a-0ubuntu6
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_IN
 SHELL=/bin/bash
SourcePackage: kdebase-workspace
Uname: Linux 2.6.28-9-generic i686

Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Is there any application in particular that uses a lot? The apps I can see in top all look normal.

Changed in kdebase-workspace (Ubuntu):
status: New → Incomplete
Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :

Unless I restart every day, I find the system very sluggish in terms of performance. Looks like some memory leak or something, but I don't know how to find out what applications are causing the same.

Currently I have only firefox/dolphin/konsole/kate opened, but the usage shows that the entire 2 GB main memory and nearly 1 GB of swap is used !! and I find even typing this comment itself slightly unresponsive sometimes.

Could you please help me find out which applications are causing this problem?
I don't how much memory each application is supposed to take.

$ free
             total used free shared buffers cached
Mem: 2053644 2001740 51904 0 6840 1225048
-/+ buffers/cache: 769852 1283792
Swap: 1726948 905276 821672

$ uptime
 02:55:55 up 8:11, 1 user, load average: 0.14, 0.29, 0.34

I am attaching the output of 'ps -ewo cmd,rsz,vsz --sort -rsz,-vsz' (all size in kb).

Thanks a lot...

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Looks like Firefox is using a ton of memory.

Revision history for this message
John Vivirito (gnomefreak) wrote :

The first screenshot does not show Firefox at all. Is there a reason for this or are they 2 separate issues. there is a bug on both we need to find out what one it is. I'm away from home all day today and tomorrow, I dont have access to my system with the bugs on it so i cant give report numbers at this time.

Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :

The first screenshot was to show the memory usage, immediately after reboot/login, without opening any applications.

So, this probably looks like two separate issues.

Please let me know what other information is needed to investigate, and I ll provide them as soon as I can.

Thanks a lot..

Revision history for this message
Kieran Hogg (xerosis) wrote :

I have to say I'm seeing a similar issue. I'm not sure if it's just under Kubuntu as I don't have ubuntu-desktop installed, but I've noticed a definite performance hit. I frequently find firefox taking up large amounts of memory, and less frequently, CPU.

Revision history for this message
Michael Johnson (mjohnson-michaelspost) wrote :

I have also seen this issue. It seems to be Firefox on my machine also. I thought it was just my system, but I recently upgraded to 4GB of RAM and still am using swap with only a few programs running (Konsole, Firefox, KVirc):
$ free -m
             total used free shared buffers cached
Mem: 3886 3549 337 0 90 1872
-/+ buffers/cache: 1586 2300
Swap: 11381 594 10787

Revision history for this message
hronir (hronir) wrote :

I'm experiencing such a problem too.
It seems to me that Firefox ask for swap pages once in a while and quite soon, after a few dozen of minutes of a normal usage, the whole of my 4GB of swap disk is filled. Moreover, since firefox write down several tens of MB each time, there are frequently temporary complete-freezing of the system during disk I/O for a few seconds each, even if the swap partition is not full.
When the partition becomes full, then, the system becomes completely unusable.
Notice that a lot of RAM remains available, it is not a lack of resources problem.

Revision history for this message
hronir (hronir) wrote :

Restarting Firefox doesn't help: it doesn't free swap space and keeps growing...

Revision history for this message
hronir (hronir) wrote :

It's not a problem of Firefox: any other application freeze the system once in a while eating several dozen of MB of swap space.
Reducing /proc/sys/vm/swappiness doesn't help too.
My current workaround is just to unmount the swap partition at all and restart my kubuntu box.
Cheers.

Revision history for this message
hronir (hronir) wrote :

Even without swap partition mounted the system crashed.
Coming back with atop, it turns out that it was willing to write to a swap partition anyway (and I guess it crashed because there is no partition available just like it was crashing when the partition was there but it was full).
This (*) is an example of what atop says for the period when the system crashed.
This means that the system would like to commit 2.2GB of virtual memory (vmcom) having 0.0MB of swap partition (SWP tot) and a vmlim of 1.0GB (from man atop I read that 'vmlim' is by default swap size plus 50% of memory size, and that the committed space is the reserved virtual space for all allocations of private memory space for processes. The kernel only verifies whether the committed space exceeds the limit if strict overcommit handling is configured (i.e. if vm.overcommit_memory is 2, but in my case it is 0).

(*)
MEM | tot 2.0G | free 74.4M | cache 1.4G | buff 24.6M | slab 35.8M |
SWP | tot 0.0M | free 0.0M | | vmcom 2.2G | vmlim 1.0G |
PAG | scan 37568 | stall 0 | | swin 0 | swout 0 |
DSK | sda | busy 0% | read 188 | write 1436 | avio 1 ms |
DSK | sdc | busy 0% | read 72 | write 9 | avio 13 ms |
DSK | sdb | busy 0% | read 67 | write 9 | avio 1 ms |

Revision history for this message
Alexander Sack (asac) wrote :

so is firefox the problem or not? Remember that even 2.2GB mem is finite, so using lots of applications might hit that barrier at some point.

Revision history for this message
Kieran Hogg (xerosis) wrote :

I can't speak for anyone else but I don't see the behaviour either under gnome, or under kde without firefox running. I did see someone mention that it may be related to the gtk-qt-curve (or whatever it's called) theme used under kde but that doesn't seem too likely.

Revision history for this message
hronir (hronir) wrote :

I see the problem also without Firefox. And the problem seems not to be related to a heavy RAM usage: it start swappin even with far less than a GB of MEM used (on a 2GB RAM machine). Maybe the problem is related to the management of cached memory: I'll try to better understand if this is the case, but let me say that just now my current MEM breakdown is 1.35GB cached, plus 541MB used (and just 6MB buffered) and the disk swap usage is 500MB which seems quite a lot to me, with only 550MB physical mem used...
Actually I can see the problem only on one of two linux boxes of mine, but the one that doesn't show this problem has a lot of RAM (8GB)...

Revision history for this message
Frank Zimmerman (pproph) wrote :

I just noticed a similar problem. I just upgraded this computer (2 gb RAM) to Jaunty last night (but I installed Ubuntu, not Kubuntu). Now, after about 6 hours of use my System Monitor shows 38% memory in use by programs and 61% in use as cache. We also have Ubuntu 9.04 on a Netbook with 1.5gb of RAM, and it doesn't seem to have the same problem, although it is not used heavily (mostly just a program or two open at a time). I just ran a test on another computer we have in the house with 2gb RAM and Jaunty recently installed. It also shows the cache memory climbing with each application opened, especially KDE apps, although I only tested it for a while, and did not get it over about 50% combined program RAM and Cache RAM. My computer seems worse, but I'm using the Kontact suite and a number of other KDE programs regularly. This problem did not exist in Ubuntu 8.10. There is definitely something going wrong here, but I can't pinpoint it. I tried killing processes, but couldn't get the cache ram to go down.

Revision history for this message
Frank Zimmerman (pproph) wrote :

One more note: I was able to get rid of the excessive cache ram by issuing the following commands from terminal:

sudo su
echo 1 > /proc/sys/vm/drop_caches
echo 2 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_caches

That doesn't solve the problem, but at least keeps the system going a little longer...

Revision history for this message
uMac (uvaio) wrote :

HI, I have exactly the same problem on kubuntu 9.04. I've never got something like that in previous versions. 2Gigs of memory are eat up like nothing by just running standard programs are always used to (FF, thunderbird, skype, pidgin or kopete).
I have no idea what echoing 1 2 3 to drop caches does but it definitely freed up about 1GB of memory immediately.

Revision history for this message
Gene (gbarrier) wrote :

Same problem on Kubuntu 9.04. After about 1/2 hour of use, everything bogs down. Yesterday I downloaded a 5 mb PDF file. Upon opening with Okular, my computer became unusable, and I had to reboot. Gnome desktop seems to work perfectly.

Also, I upgraded from 8.10 to 9.04 / KDE 4.2 via update manager. (not fresh install)

Revision history for this message
Ernesto Gutierrez (ernesto-g3) wrote :

Just want to add my 2 cents on the matter.

I have only 1 gig of memory. Ubuntu Intrepid upon boot was always between 300 - 400 mb. Whereas kubuntu jaunty (fresh install) starts up at around 750 megs. Thats almost double the space of my prior ubuntu install.

Revision history for this message
dtr (dtr) wrote :

I too have noticed that swap memory was being used when I still had lots of ram free, I'm running Kubuntu 9.04 and I have 2GB of ram, not sure how it acts with people with on 1 gig or less or ram, anyway last night I found an article on Novel website "Staying on Top of Your Memory Usage in Linux ", and I followed the suggestions, reducing swappiness to 10, so far I haven't noticed any negative effects and my swap hasn't been used at all. But this version of Kubuntu still seems to use a lot of ram.

Revision history for this message
John Vivirito (gnomefreak) wrote :

This seems to be more of a gtk app on KDE not working properly not just firefox

Revision history for this message
wolfie2x (wolfie2x) wrote :

I have the same problem on Ubuntu 9.04. Apps I run: Firefox, Thunderbird, Kdevelop, VirtualBox. The same apps on Intrepid never caused the swap to be used on my 1GB laptop. Jaunty starts to fill up half of my 1GB swap while only 50% of RAM is used. System becomes extremely sluggish. After using for a day, it fills up my swap entirely and about 80% RAM.
As per the earlier comments looks like my kde app kdevelop might be triggering the issue. The problem is bad enough for me to have to switch back to intrepid.

Revision history for this message
John Vivirito (gnomefreak) wrote :

Not sure what KDE package this should be on but since it is only related to KDE but not all the same app.
does anyone have firefox-3.0-gnome-support package installed? If not please install it and see if it helps at all.
Yes it can be used on KDE atleast until Mozilla starts supporting QT maybe a long while on that

affects: firefox-3.0 (Ubuntu) → kde4base (Ubuntu)
Revision history for this message
Tarrok (iderete) wrote :

Yeah man!!! firefox-3.0-gnome-support already installed, but on my Gnome-Ubuntu-Jaunty my swap still running high, with firefox. Maybe could be another problem without solution!!! A Bug, who knows!! i m tired this, all day i need to restart system cause the swap is consuming 80-90% with no apps on!!! and memory usage is at 15-30%!!! Solutions please...i m thinking migrate linux distro!!! :( unfortunately...

Revision history for this message
wolfie2x (wolfie2x) wrote :

Here's what solved the swap growth issue for me: (Not sure if its related but might help someone).

I had sluggish performance with intel graphics, so I followed this guide and switched to UXA from EXA. That's when I noticed the swap growth but didn't think they were related at all.
http://ubuntuforums.org/showthread.php?t=1130582

After googling around I found UXA has some major memory leaks which could cause swap growth.
https://bugs.launchpad.net/ubuntu/jaunty/+source/xserver-xorg-video-intel/+bug/359392/comments/517

I Switched back to EXA (only changing xorg.conf but still with driver upgrades and patch scripts), and that resolved my issues. No compiz, but I have acceptable graphics performance and no memory/swap worries.

Revision history for this message
hronir (hronir) wrote :

I'have an intel graphics too: same issues of wolfie2x concerning UXA/EXA.
But I can't do without compiz, so I reverted Xorg intel driver to 2.4 following this guide:

https://wiki.ubuntu.com/ReinhardTartler/X/RevertingIntelDriverTo2.4

Now compiz actually works much like with UXA.
And now I didn't experience system freezes (intel graph issue) nor swap growth, but the truth is that I never used my ubuntu box for more than a few dozen of minutes from when I got the downgrade above, so I can't really say if it works for sure.
I'll reply here again if I'll find it is not enough, but it could worth a shot.
Cheers.

Revision history for this message
Musthafa Meeran (musthafameeran-deactivatedaccount) wrote :

I think this problem has something to do with the xorg intel drivers only.
I don't have these issues now, after reverting to older intel 2.4 driver and with the MTRR fix. BTW, I am currently using Ubuntu 9.04 with gnome desktop.

Revision history for this message
Kieran Hogg (xerosis) wrote :

Downgrading to the intel 2.4 driver has appeared to solve this issues for me.

affects: kde4base (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → New
Revision history for this message
Kieran Hogg (xerosis) wrote :

Despite improving performance, the memory problems seems to remain.

Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automatic notification.]

A new major version of the -intel driver is now available in Karmic.

This version includes a major reworking of the acceleration
architecture, which resolves a huge number of issues. We do not know
whether it resolves the issue you reported.

Would you mind testing Karmic Alpha-2 and seeing if it is still a
problem? CD ISO images are available here:

  http://cdimages.ubuntu.com/releases/karmic/

If the issue can still be reproduced on karmic, please report here with
your findings, and attach a fresh Xorg.0.log from your test, and we will
be able to forward the bug upstream.

Otherwise, if the bug no longer exists in Karmic, let us know that as
well.

In the off chance you encounter different bugs while attempting to test
Karmic, please report those as new bug reports.

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Incomplete
Revision history for this message
Bryce Harrington (bryce) wrote :

We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms the bug is one we may be able to pass upstream for help.

It seems likely to me this bug is gone; the -intel driver has improved immensely in Karmic and a lot of bugs are being reported as no longer present. So hopefully that's the case here too.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Incomplete → Invalid
Peter Hoeg (peterhoeg)
Changed in xserver-xorg-video-intel (Ubuntu):
status: Invalid → In Progress
Revision history for this message
Peter Hoeg (peterhoeg) wrote :

I am running jaunty with nvidia graphics and am also seeing excessive (realising that top doesn't report shared memory properly) memory usage. This machine has been up for a number of days and here is the output of top

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24707 local 20 0 913m 290m 15m S 8 7.4 1241:22 kwin
11822 local 20 0 935m 140m 53m S 4 3.6 0:54.55 plasma-desktop
24401 root 20 0 950m 432m 3652 S 2 11.0 368:24.92 Xorg

X using 432m and kwin 289m seems excessive to me.

If I then log out, I can see that X still continues to take up all the memory, but after /etc/init.d/kdm restart and logging back in this is the picture:

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19151 local 20 0 557m 80m 36m S 1 2.0 0:20.91 kwin
18778 root 20 0 573m 63m 12m S 0 1.6 0:20.25 Xorg
19158 local 20 0 705m 54m 24m S 2 1.4 0:07.12 plasma-desktop

A whole different situation.

Everything else was the same in both scenarios with the exception of uptime. There were no applications running.

Bryce Harrington (bryce)
tags: added: kubuntu
tags: added: jaunty
Revision history for this message
STaRMaN (jarizaro) wrote :

I'm having this problem too, with Kubuntu Jaunty , last updates until today, ppa included.
My graphic card is intel gma x3100 (chipset GM965).

At first, i think the problemas was with some plasmoid, but, today, i disabled all, and the problem continues.
I disabled fsrunner (addon for krunner). This is not the problem.

after 7 hours of running.
free -m, report this:
                                  total used free shared buffers cached
                 Mem: 2004 1928 75 0 7 1077
 -/+ buffers/cache: 843 1160
                 Swap: 2368 1391 977
Top process (with htop or top) are always Xorg, and plasma-desktop.
I never had problems with intrepid, the problems begin with i upgraded to kde 4.3 in jaunty.

top:
3145 root 20 0 535m 132m 29m S 7 6.6 63:00.55 Xorg
3751 jarizaro 20 0 239m 12m 8552 S 4 0.6 37:15.92 kwin
15928 jarizaro 20 0 155m 28m 17m R 2 1.4 0:02.44 konsole
3758 jarizaro 20 0 366m 30m 13m S 1 1.5 12:25.96 plasma-desktop
2805 mysql 20 0 126m 9368 2576 S 0 0.5 0:19.30 mysqld

Xorg+plasma desktop are eating .. 900MB of swap ¿? strange.

Revision history for this message
Geir Ove Myhr (gomyhr) wrote :

This bug report has been inactive for quite some time and in the meantime Ubuntu has moved along. I hope the reported problem has been resolved in the current version of Ubuntu. If it has not and there are people willing to follow up with information collecting and testing, it is best to file a new bug report with the latest Ubuntu development version (currently 10.04, but soon 10.10), using the ubuntu-bug command if possible. Feel free to mention the bug number of this bug.

We are sorry that we are not always have the capacity to look at all reported bugs in a timely manner. Occationally we have to purge old bug reports where no progress has been made, whether it is due to reporter not being able to respond or lack of manpower on the Ubuntu side, in order to keep our list of "active" bugs current. Sorry for the inconvenience this may cause.

Here are a few tips that will increase the chances that your bug gets priority:
* Read https://wiki.ubuntu.com/X/Reporting
* Browse https://wiki.ubuntu.com/X and see if there is some relevant information for you problem
* Respond quickly to questions from triagers
* Try changing things to see if the behaviour changes, e.g.
  * A new mainline kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D (more information at https://wiki.ubuntu.com/KernelTeam/MainlineBuilds)
  * The xorg-edgers PPA: https://launchpad.net/~xorg-edgers/+archive/ppa
  * Various options in `/etc/X11/xorg.conf` (see `man intel`)
* Browse other bug reports to see if you find a similar one and provide the information that is being asked for there.

Revision history for this message
Chris Wilson (ickle) wrote :

Before this was hijacked, this was about the unbounded bo cache in UXA.

Changed in xserver-xorg-video-intel (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.