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

how to reduce the RAM usage in KDE

Tags: None
(comma "," separated)
decodedthought
Registered Member
Posts
12
Karma
0
OS

how to reduce the RAM usage in KDE

Sun Nov 20, 2011 9:59 pm
hi again,
I am running KDE on Arch Linux and I noticed that the RAM usage for KDE is slightly higher than what I used to see on Gnome.
After starting up Arch Linux, usually in Gnome it takes only i think ~300Mb but on KDE it takes ~500Mb I have 4 gig Ram so I really don't care about it that much but I would like to know if there are some unnecessary things that needs to be removed from the startup ?
I removed Nepomuk is there anything else that I need to remove?
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
What processes take up most memory?


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
decodedthought
Registered Member
Posts
12
Karma
0
OS
Kwin + Plasma desktop !
What should the normal RAM usage be, after starting the OS ?
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I think that's very hard to generalize. Here "System Activity" reports that plasma-desktop takes 27.9 MB and kwin 19.6 MB, but measuring memory usage is always tricky. This is with ~11 hours uptime by the way, 1.5 GB total RAM.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
toad
Global Moderator
Posts
1258
Karma
7
OS
Code: Select all
toad@deskarch 953\8 ~ > uptime
 19:54:13 up 10:00,  2 users,  load average: 0.26, 0.16, 0.14


plasma 55.1MB (shared 31.1MB)
kwin 51.7 (shared 30.7MB)

But I am not surprised that KDE has a slightly larger mem footprint - seeing that you are on Arch I take it you have the latest gnome. If you tried XFCE4 it should be even lower and xmonad or ratpoison will hardly register on the mem Richter scale...


Debian testing
decodedthought
Registered Member
Posts
12
Karma
0
OS
toad wrote:
Code: Select all
toad@deskarch 953\8 ~ > uptime
 19:54:13 up 10:00,  2 users,  load average: 0.26, 0.16, 0.14


plasma 55.1MB (shared 31.1MB)
kwin 51.7 (shared 30.7MB)

But I am not surprised that KDE has a slightly larger mem footprint - seeing that you are on Arch I take it you have the latest gnome. If you tried XFCE4 it should be even lower and xmonad or ratpoison will hardly register on the mem Richter scale...

i am running KDE only ... well I really dont care about the ram usage because I have 4 gig ram and besides I like KDE. for now light weight DE/WM is not an option. I posted this thread just to know if there are things I should tweak to make my experience much better :D
User avatar
Gigadoc 2
Registered Member
Posts
10
Karma
0
OS
My KDE also has a ridiculous RAM usage, I am also running Arch Linux.

Right now, after logging into KDE (autostarted applications are Kontact and Gajim), and opening Firefox, the RAM usage is about 1.8GB. Also, the system reacts sometimes very slow, especially when using Kontact with the KMail component. Also, I/O activity seems to be very high, according to the noise made by my drives.

To put it short, KDE seems to be slower than it should be, on a Machine with 2 120MB/s Harddrives (one Harddrive holds /, the other one /home), a Phenom II X4 955, and 4Gigs of DDR3-RAM. I don't know what the average KDE-Users specs are, but I think it should at least run smooth and start up fast.

I tried to find the memory eating process, but aside from virtuoso-t and firefox, there are no "outstanding" processes. Even withouth virtuoso and firefox, total RAM usage would still be around 1.3GB, what seems to be too much for me.
Since I do not know a better way of posting my RAM usage stats, I'll boldly link a screenshot of the task manager, tasks sorted by ram usage: http://cloud.revreso.de/apps/files_sharing/get.php?token=0f180e2261d6cab4fa8a9fcf0b60917c748e644a
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you please try closing all KDE PIM applications then running the following and see how memory usage changes? This process stops Nepomuk and Akonadi.
Code: Select all
akonadictl stop && sleep 30s && qdbus org.kde.NepomukServer /nepomukserver quit


If you need to use KDE PIM applications afterward, you may need to run this prior to starting them:
Code: Select all
nepomukserver && sleep 20s && akonadictl start


See how that impacts memory utilisation and disk usage. Akonadi/Nepomuk have both been known to use the hard disk quite a bit under the right circumstances.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Gigadoc 2
Registered Member
Posts
10
Karma
0
OS
Ok, I closed Kontact (closing it via GUI apparently didn't shut it down completely, I had to kill the process) and the Korganizer-Remider, now total RAM usage (including Firefox and Gajim, as before) is about 900MB.

Here the output of ps, sorted by memory usage (I removed all that module stuff):
Code: Select all
   72 /usr/lib/kde4/libexec/start_kdeinit +kcminit_startup
  216 kwrapper4 ksmserver
  228 /usr/bin/ssh-agent -- /usr/bin/startkde
  236 supervising syslog-ng
  356 dhcpcd -q eth0
  460 /usr/bin/dbus-launch --sh-syntax --exit-with-session
  532 udisks-daemon: not polling any devices
  568 /usr/bin/gpg-agent -s --daemon --pinentry-program /usr/bin/pinentry-qt4 --write-env-file
  648 init [5]           
  740 sort -b -k1,1n
  764 /sbin/agetty -8 -s 38400 tty1 linux
  764 /sbin/agetty -8 -s 38400 tty2 linux
  768 /sbin/agetty -8 -s 38400 tty3 linux
  768 /sbin/agetty -8 -s 38400 tty4 linux
  768 /sbin/agetty -8 -s 38400 tty5 linux
  772 /sbin/agetty -8 -s 38400 tty6 linux
  832 /lib/udev/udevd --daemon
  840 /bin/bash
 1004 ps -e -orss=,args=
 1096 /usr/sbin/g15daemon
 1152 ksysguardd
 1152 /usr/sbin/crond
 1160 /usr/lib/rtkit-daemon
 1300 /lib/udev/udevd --daemon
 1340 /lib/udev/udevd --daemon
 1560 /bin/sh /usr/bin/startkde
 1628 /usr/bin/dbus-daemon --system
 1864 /usr/bin/ntpd -g -p /var/run/ntpd/ntpd.pid
 2116 /bin/bash
 2448 /usr/lib/gvfs//gvfs-fuse-daemon /home/gigadoc2/.gvfs
 2476 /usr/lib/gvfs/gvfsd
 2616 /usr/lib/pulse/gconf-helper
 2632 /usr/lib/gvfs/gvfsd-burn --spawner :1.48 /org/gtk/gvfs/exec_spaw/1
 2788 /usr/sbin/gdm-binary -nodaemon
 3012 /usr/sbin/syslog-ng
 3096 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 3184 /usr/lib/gvfs/gvfsd-trash --spawner :1.48 /org/gtk/gvfs/exec_spaw/0
 3320 /usr/lib/GConf/gconfd-2
 3328 /usr/sbin/console-kit-daemon --no-daemon
 3368 gdm-session-worker [pam/gdm-password]
 3460 /usr/lib/upower/upowerd
 3492 /usr/lib/accountsservice/accounts-daemon
 3560 /usr/lib/udisks/udisks-daemon
 3860 /usr/lib/gvfs/gvfs-gdu-volume-monitor
 4064 /usr/lib/polkit-1/polkitd --no-debug
 4216 /usr/lib/telepathy/mission-control-5
 4332 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
 8344 /usr/bin/pulseaudio --start --log-target=syslog
 8988 /usr/bin/kwrited
10216 /usr/lib/tracker/tracker-miner-flickr
10584 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-gigadoc2/klauncherhX1054.sla
11984 python2 /usr/share/dockmanager/scripts/gajim_badge.py
12056 /usr/lib/tracker/tracker-miner-fs
12532 kdeinit4: klauncher [kdeinit] --fd=9           
13140 /usr/lib/tracker/tracker-store
13552 /usr/lib/gnome-online-accounts/goa-daemon
15196 /usr/bin/nm-applet
22756 /usr/bin/kuiserver
24464 kdeinit4: kdeinit4 Running...                 
26080 /usr/bin/nepomukcontroller
27688 /usr/bin/kwalletmanager --kwalletd
27980 /usr/lib/kde4/libexec/polkit-kde-authentication-agent-1
28256 /usr/bin/kactivitymanagerd
30360 /usr/lib/firefox/plugin-container /usr/lib/mozilla/plugins/libflashplayer.so -greomni /usr/lib/firefox/omni.jar 1520 plugin
32812 kdeinit4: kaccess [kdeinit]                   
33044 kdeinit4: kglobalaccel [kdeinit]               
33476 kdeinit4: klipper [kdeinit]                   
33628 kdeinit4: ksmserver [kdeinit]                 
35188 kdeinit4: kwalletd [kdeinit]                   
37912 kdeinit4: kmix [kdeinit]                       
38344 /usr/bin/yakuake
42048 kdeinit4: kded4 [kdeinit]                     
44704 /usr/bin/knotify4
47992 /usr/bin/Xorg :0 -br -verbose -logverbose 7 -auth /var/run/gdm/auth-for-gdm-kaeavT/database -nolisten tcp vt7
61996 python2 /usr/bin/printer-applet
63796 /usr/bin/python2 -OO gajim.py
76016 kdeinit4: krunner [kdeinit]                   
104844 kwin
118356 kdeinit4: plasma-desktop [kdeinit]             
259388 /usr/bin/firefox

Yes, ATM I am using GDM to login, but that is just for the purpose of trying out GNOME, no permanent setup. I still prefer KDE for my Desktop ;)

The following output is after closing Gajim and Firefox (total usage was about 700MB):
Code: Select all
   72 /usr/lib/kde4/libexec/start_kdeinit +kcminit_startup
  216 kwrapper4 ksmserver
  228 /usr/bin/ssh-agent -- /usr/bin/startkde
  236 supervising syslog-ng
  356 dhcpcd -q eth0
  460 /usr/bin/dbus-launch --sh-syntax --exit-with-session
  532 udisks-daemon: not polling any devices
  568 /usr/bin/gpg-agent -s --daemon --pinentry-program /usr/bin/pinentry-qt4 --write-env-file
  648 init [5]           
  740 sort -b -k1,1n
  764 /sbin/agetty -8 -s 38400 tty1 linux
  764 /sbin/agetty -8 -s 38400 tty2 linux
  768 /sbin/agetty -8 -s 38400 tty3 linux
  768 /sbin/agetty -8 -s 38400 tty4 linux
  768 /sbin/agetty -8 -s 38400 tty5 linux
  772 /sbin/agetty -8 -s 38400 tty6 linux
  832 /lib/udev/udevd --daemon
  976 pr -TW161
 1004 ps -e -orss=,args=
 1096 /usr/sbin/g15daemon
 1152 ksysguardd
 1152 /usr/sbin/crond
 1160 /usr/lib/rtkit-daemon
 1300 /lib/udev/udevd --daemon
 1340 /lib/udev/udevd --daemon
 1560 /bin/sh /usr/bin/startkde
 1628 /usr/bin/dbus-daemon --system
 1864 /usr/bin/ntpd -g -p /var/run/ntpd/ntpd.pid
 2116 /bin/bash
 2448 /usr/lib/gvfs//gvfs-fuse-daemon /home/gigadoc2/.gvfs
 2476 /usr/lib/gvfs/gvfsd
 2616 /usr/lib/pulse/gconf-helper
 2632 /usr/lib/gvfs/gvfsd-burn --spawner :1.48 /org/gtk/gvfs/exec_spaw/1
 2788 /usr/sbin/gdm-binary -nodaemon
 3012 /usr/sbin/syslog-ng
 3096 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 3184 /usr/lib/gvfs/gvfsd-trash --spawner :1.48 /org/gtk/gvfs/exec_spaw/0
 3320 /usr/lib/GConf/gconfd-2
 3328 /usr/sbin/console-kit-daemon --no-daemon
 3368 gdm-session-worker [pam/gdm-password]
 3460 /usr/lib/upower/upowerd
 3492 /usr/lib/accountsservice/accounts-daemon
 3560 /usr/lib/udisks/udisks-daemon
 3860 /usr/lib/gvfs/gvfs-gdu-volume-monitor
 4064 /usr/lib/polkit-1/polkitd --no-debug
 4216 /usr/lib/telepathy/mission-control-5
 4332 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
 8456 /usr/bin/pulseaudio --start --log-target=syslog
 8988 /usr/bin/kwrited
10216 /usr/lib/tracker/tracker-miner-flickr
11984 python2 /usr/share/dockmanager/scripts/gajim_badge.py
12056 /usr/lib/tracker/tracker-miner-fs
12272 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-gigadoc2/klauncherhX1054.sla
12272 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-gigadoc2/klauncherhX1054.sla
12532 kdeinit4: klauncher [kdeinit] --fd=9           
13140 /usr/lib/tracker/tracker-store
13552 /usr/lib/gnome-online-accounts/goa-daemon
15196 /usr/bin/nm-applet
22756 /usr/bin/kuiserver
24464 kdeinit4: kdeinit4 Running...                 
27688 /usr/bin/kwalletmanager --kwalletd
27980 /usr/lib/kde4/libexec/polkit-kde-authentication-agent-1
28256 /usr/bin/kactivitymanagerd
32456 /usr/bin/nepomukcontroller
32812 kdeinit4: kaccess [kdeinit]                   
33044 kdeinit4: kglobalaccel [kdeinit]               
33476 kdeinit4: klipper [kdeinit]                   
33628 kdeinit4: ksmserver [kdeinit]                 
35188 kdeinit4: kwalletd [kdeinit]                   
37912 kdeinit4: kmix [kdeinit]                       
38504 /usr/bin/yakuake
42216 kdeinit4: kded4 [kdeinit]                     
45244 /usr/bin/knotify4
48384 /usr/bin/Xorg :0 -br -verbose -logverbose 7 -auth /var/run/gdm/auth-for-gdm-kaeavT/database -nolisten tcp vt7
61996 python2 /usr/bin/printer-applet
76016 kdeinit4: krunner [kdeinit]                   
106552 kwin
118636 kdeinit4: plasma-desktop [kdeinit]

If it makes any difference: I have switched the QT Graphics System to Raster instead of XRender, it runs faster with a Nvidia-Dualscreen setup.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
How many applets do you have open? Also, is this a freshly started session or one that is several days old? My fairly minimal session has been running for several days, leading to Plasma consuming 145mb of RAM. KWin is only using about 70mb though, but that could be due to the NVidia driver.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Gigadoc 2
Registered Member
Posts
10
Karma
0
OS
I configured KDE to start a blank session on login, and posted the last post right after logging in, so I would call it a fresh session.
Running Applets are: Folder View, System Monitor (showing CPU, Network, Ram usage and temperatures), and on a panel: kickoff, workspace-switcher, icontasks, notification tray and a clock.

I am using the proprietary nvidia-driver too, running a twinview setup with a total resolution of 2304x1024 (1280x1024 + 1024x786), just in case the screen size plays an important role for plasma.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Ok, nothing too major there. I would guess that screen size likely does play a role in how much memory is used by Plasma. Given your Plasma instance is using less memory than mine does at the moment, I would consider the memory used by Plasma on your system to normal.

There isn't much you can do to reduce memory usage at this point other than killing off the GNOME processes to avoid two toolkits being loaded at once.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Gigadoc 2
Registered Member
Posts
10
Karma
0
OS
Are there some improvements to this topic in the upcoming release?

By the way, I am reinstalling Arch on my Notebook (not the PC we are talking about), and I am going to try out KDE on it (actually the first time trying to use KDE4.x on a mobile device). Just for the sake of completeness, I will post the memory usage in this thread. Since it has only one screen, the memory usage should be lower.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I am not aware of any specific work on memory optimisation, but due to the Plasma Active effort, some optimisations could have been done. It hasn't been specifically mentioned though.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Gigadoc 2
Registered Member
Posts
10
Karma
0
OS
Ok, so after switching from my dual-head setup to one FullHD-Screen, and upgrading to KDE4.8 (it was around the same time, so I can't say for sure what did it), the RAM-Usage is now at an acceptable level.

Maybe it really was plasma being scaled on a huge virtual twinview-screen, but at least for me its solved now.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]