Bug 181876 - After a few minutes : KDE is completely slow as swap space is fully used abnormally
Summary: After a few minutes : KDE is completely slow as swap space is fully used abno...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-25 16:24 UTC by Vouchy Barns
Modified: 2009-02-18 17:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
recording (548.07 KB, application/octet-stream)
2009-02-09 22:08 UTC, Vouchy Barns
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vouchy Barns 2009-01-25 16:24:54 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Fedora RPMs

Hi,

I installed KDE 4.2 from KDE tesing repo on Fedora 10.

After a few minutes the swap space used increases abormally which causes the system to slow down and become completely unusable.
Even if the RAM is not compleetely used 

for ex : 1gif of 4gig is used for RAM 
and swap used increases to the max of 2 gig...
How Can I help? to diagnose this issue?

Regards
vouchy
Comment 1 Dario Andres 2009-01-25 17:25:12 UTC
What applications are using the RAM/swap ? You can use KSysguard, or the "top" command. Not using the whole RAM and using the swap may be a system-wide setting in your configuration. (Not sure what setting now)
Comment 2 Vouchy Barns 2009-01-26 10:20:47 UTC
Hi,


Thanks for your quick reply.

Actually, swap is used because RAM memory is fully used.
So the issue is more : "A memory leak" which causes system to swap.
Here is the top evolution after 10 minutes  :

top - 10:04:08 up 6 min,  5 users,  load average: 1.19, 1.53, 0.80
Tasks: 166 total,   2 running, 164 sleeping,   0 stopped,   0 zombie
Cpu(s):  6.3%us,  2.9%sy,  0.0%ni, 90.6%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   4051108k total,  3457528k used,   593580k free,    25780k buffers
Swap:  2048248k total,        0k used,  2048248k free,  2518912k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3348 root      20   0  586m 163m  22m S  8.0  4.1   0:55.83 X
 4048 scorbel   20   0  502m  86m  21m S  0.0  2.2   0:12.72 firefox
 2922 root      20   0  516m  68m  12m S  0.0  1.7   0:05.70 webAccess
 3831 scorbel   20   0  689m  56m  25m S  1.3  1.4   0:09.15 plasma
 4714 scorbel   20   0  506m  48m  23m S  0.0  1.2   0:05.60 thunderbird-bin
 3094 root      20   0  194m  45m  14m S  0.0  1.2   0:01.55 vmware-hostd
 4071 scorbel   20   0  403m  37m  22m S  0.0  1.0   0:00.49 python
 4039 scorbel   20   0  688m  36m  19m S  0.0  0.9   0:01.14 pidgin
 3927 scorbel   20   0  337m  35m 4172 S  0.0  0.9   0:00.35 mysqld
 4560 scorbel   20   0  427m  34m  21m S  0.0  0.9   0:02.18 dolphin
 5109 scorbel   20   0  371m  32m  23m S  0.0  0.8   0:00.93 kate
 3901 scorbel   20   0  595m  28m  21m S  0.0  0.7   0:00.68 krunner
 3923 scorbel   20   0  404m  27m  16m S  2.3  0.7   0:02.43 konsole
 4056 scorbel   20   0  338m  26m  12m S  0.0  0.7   0:00.50 guidance-power-
 3821 scorbel   20   0  329m  23m  16m S  0.7  0.6   0:14.56 kwin
 3829 scorbel   20   0  501m  22m  13m S  0.0  0.6   0:00.44 knotify4
 3778 scorbel   20   0  428m  19m  14m S  0.0  0.5   0:00.65 kded4
 3819 scorbel   20   0  324m  17m  14m S  0.0  0.5   0:00.22 ksmserver
 4082 scorbel   20   0  365m  15m 9868 S  0.7  0.4   0:02.64 cairo-dock
 3910 scorbel   20   0  276m  15m  13m S  0.0  0.4   0:00.12 konqueror
 3905 scorbel   20   0  276m  15m  11m S  0.0  0.4   0:00.19 kmix
 4055 scorbel   20   0  285m  15m  12m S  0.0  0.4   0:00.08 akonadi_vcard_r
 4078 scorbel   20   0  298m  12m  10m S  0.0  0.3   0:00.21 klipper
 3776 scorbel   20   0  243m  11m 9920 S  0.0  0.3   0:00.13 klauncher
 4068 scorbel   20   0  332m  10m 8552 S  0.0  0.3   0:00.42 nm-applet
 3892 scorbel   20   0  245m  10m 8256 S  0.0  0.3   0:00.09 kaccess
 3830 scorbel   20   0  250m  10m 8000 S  0.0  0.3   0:00.05 nepomukserver
 4180 scorbel   20   0  193m 9.9m 6480 S  0.0  0.3   0:00.24 emerald
 4595 scorbel   20   0  243m 6780 4260 S  0.0  0.2   0:00.01 kio_trash
 3914 scorbel   20   0  353m 6204 4616 S  0.0  0.2   0:00.05 akonadiserver



After 10minutes

top - 10:09:12 up 11 min,  5 users,  load average: 0.69, 0.99, 0.75
Tasks: 168 total,   2 running, 166 sleeping,   0 stopped,   0 zombie
Cpu(s):  8.0%us,  3.5%sy,  0.0%ni, 88.3%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   4051108k total,  4027268k used,    23840k free,     1816k buffers
Swap:  2048248k total,  2048248k used,        0k free,  2000284k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3348 root      20   0  591m 170m  22m R 10.6  4.3   1:40.82 X
 4048 scorbel   20   0  491m  85m  21m S  0.0  2.2   0:14.93 firefox
 2922 root      20   0  516m  68m  12m S  0.0  1.7   0:06.06 webAccess
 3831 scorbel   20   0  689m  56m  25m S  1.0  1.4   0:15.90 plasma
 4714 scorbel   20   0  506m  48m  23m S  0.0  1.2   0:06.27 thunderbird-bin
 3094 root      20   0  194m  45m  14m S  0.0  1.2   0:01.61 vmware-hostd
 4071 scorbel   20   0  403m  37m  22m S  0.0  1.0   0:00.49 python
 4039 scorbel   20   0  688m  36m  19m S  0.0  0.9   0:01.20 pidgin
 3927 scorbel   20   0  337m  35m 4172 S  0.0  0.9   0:00.56 mysqld
 5109 scorbel   20   0  393m  35m  24m S  0.0  0.9   0:03.16 kate
 4560 scorbel   20   0  427m  34m  21m S  0.0  0.9   0:02.27 dolphin
 3901 scorbel   20   0  595m  28m  21m S  0.0  0.7   0:00.79 krunner
 3923 scorbel   20   0  404m  27m  16m S  3.6  0.7   0:04.29 konsole
 5482 scorbel   20   0  383m  27m  19m S  2.7  0.7   0:12.78 ksysguard
 4056 scorbel   20   0  338m  26m  12m S  0.0  0.7   0:00.78 guidance-power-
 3821 scorbel   20   0  329m  23m  16m S  1.0  0.6   0:23.27 kwin
 3829 scorbel   20   0  501m  22m  13m S  0.0  0.6   0:00.47 knotify4
 3778 scorbel   20   0  428m  19m  14m S  0.0  0.5   0:00.72 kded4
 3819 scorbel   20   0  324m  17m  14m S  0.0  0.5   0:00.23 ksmserver
 4082 scorbel   20   0  365m  15m 9868 S  0.7  0.4   0:04.66 cairo-dock
 3910 scorbel   20   0  276m  15m  13m S  0.0  0.4   0:00.14 konqueror
 3905 scorbel   20   0  276m  15m  11m S  0.0  0.4   0:00.21 kmix
 4055 scorbel   20   0  285m  15m  12m S  0.0  0.4   0:00.08 akonadi_vcard_r
 4078 scorbel   20   0  298m  12m  10m S  0.7  0.3   0:00.39 klipper
 3776 scorbel   20   0  243m  11m 9920 S  0.0  0.3   0:00.13 klauncher
 4068 scorbel   20   0  332m  10m 8552 S  0.0  0.3   0:00.50 nm-applet
 3892 scorbel   20   0  245m  10m 8256 S  0.0  0.3   0:00.13 kaccess
 3830 scorbel   20   0  250m  10m 8000 S  0.0  0.3   0:00.05 nepomukserver
 4180 scorbel   20   0  193m 9.9m 6480 S  0.0  0.3   0:00.34 emerald
 4595 scorbel   20   0  243m 6832 4280 S  0.0  0.2   0:00.02 kio_trash

If you have any clue ??
This is not happening with Gnome.
Regards
vouchy
Comment 3 Dario Andres 2009-01-26 14:27:05 UTC
When you are in "top", you can type "M" (Shift+m) to order the process by memory usage. So the processes consuming more memory will appear in the top of the list.
((Looking at the lists you posted it seems they are already ordered by mem usage))

In the process list you posted I can't see any bigmemoryconsumer application.

Also you are running a lot of different applications, so, can you try starting one application at time, (or using only KDE-apps) for a while to test, what application is leaking memory.

Thanks
Comment 4 Vouchy Barns 2009-02-09 14:43:24 UTC
Hi,

Still got the issue ...
It seems that the cache is growing up ...  when memory is full, cache is full system swaps.
To get rid of this I have to echo 1 > /proc/sys/vm/drop_caches
Why caching is so intensively used with kde and not with gnome ??

Rgs
vouchy
Comment 5 Vouchy Barns 2009-02-09 21:47:32 UTC
Sorry, I can't get rid of this dropping cache ...using any workaround

Cache is fully used then system swaps anormally

Please help me to investigate root cause of this issue?
I will attach a small .ogg showing the culprit ...

I do not have any issue with FC10+gnome+compiz but I prefer to use KDE ...

Rgs
vouchy

Comment 6 Dario Andres 2009-02-09 21:49:26 UTC
Did you tested what I commented in comment 3 ? 
Leaving a "default" desktop (not apps launched) some time..., check the memory. And start applications one by one, checking the memory 
Thanks
Comment 7 Vouchy Barns 2009-02-09 22:06:48 UTC
Yes, I just tested it 

Closed all apps , only networkmanager, kinfocenter are running
I can close thos apps I am pretty sure the same will occur

The cache is increasing as recorded by the video then when cache is full swap is used until system is unusable ...

Rgs
vouchy
Comment 8 Vouchy Barns 2009-02-09 22:08:01 UTC
Created attachment 31163 [details]
recording
Comment 9 Vouchy Barns 2009-02-09 22:11:51 UTC
Hi,

I am confirming that with gnome+compiz all metrics (free, disk cache ...) are staying the same if I do not do anything...They are not increasing

Rgs
vouchy
Comment 10 Dario Andres 2009-02-09 22:12:38 UTC
Can you try with a clean new user account ? (just for testing). The new user account will have only defaults applications on load.
Login on that test account only and see what happens. 

Also, try to disable the KNetworkManager app/plasmoid.
Thanks
Comment 11 Vouchy Barns 2009-02-09 22:35:41 UTC
OK,

Here is what I did :

- Created a test user and logged in with this user

Comment 12 Vouchy Barns 2009-02-09 22:40:32 UTC
Then I killed everything until the free memory does not decrease.

Then I logged in back with my user ...
and began to start apps one by one ...
The memory metrics was staying calm:=) the same .. Issue was not there!
Then I used the services manager to start NetworkManager, the applet started, and the memory stayed calm , cool !
And when I closed the services manager window ---> The issue reappears and the free memory began to decrease continuously...
Maybe related to kwin and window management ... What do you think?

Thanks a lot for your help
Any clue??

Rgs
vouchy


Comment 13 Dario Andres 2009-02-09 22:42:18 UTC
It may be related , can you try using another Window Decoration? (like Plastique) , or dissabling Desktop Effects (if they are activated)
Comment 14 Vouchy Barns 2009-02-10 20:35:18 UTC
Hi,

disabling desktop effects solved the issue...
Any clue to investigate?

I tried to enable destop effect but disable all effects and issue is back again..

Please how can I find the root cause?

Rgs
vouchy
Comment 15 Dario Andres 2009-02-10 20:36:56 UTC
May be the reponsible of the Desktop Effects will know how to help
Comment 16 Martin Flöser 2009-02-10 20:48:57 UTC
First to check: which graphics card and which driver are you using? If available could you try a newer release? E.g. NVIDIA 180.x instead of 177.x. I assume you are using the OpenGL backend. Does changing to the XRender backend help?

I once had this problem with KDE 4.0. but since then everything is fine.
Comment 17 Vouchy Barns 2009-02-10 21:11:09 UTC
Hi,

Intel Corporation Mobile GM965 and the xf86-video-intel 2.5.0 intel drivers. 
drivers compiled against running kernel. 
2.6.27.12-170.2.5.fc10.x86_64
I will try Xrender.

Regards
vouchy
Comment 18 Vouchy Barns 2009-02-12 10:53:08 UTC
Hi,


finally installed 2.6.29 kernel and compiled intel drivers ...

So far (A day) no issue anymore ...

I can now take the benefit of using KDE 4.2 which I sincerely love!!
Thanks a lot for your effort.

Regards
vouchy
Comment 19 klinger.ofir 2009-02-18 17:00:02 UTC
There is a bug in launchpad which looks the same as this bug:
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/303011

Maybe someone could help to resolve that bug.