Using KDE4 on low memory computers with openSUSE 11.4

People try different options to keep using their old computers for simple tasks. For example, just to browse the internet. While there are a lot of such options, like installing window managers that need little resources, it might come as a surprise to some that you can run KDE4 in 512 MB RAM. This way you can use a familiar and good looking desktop environment. The trick is to disable akonadi/nepomuk so they don’t take up precious RAM. This means you will not be able to use the KDE personal information manager suite (kmail, kontact, kaddressbook etc) and you will lose a number of plasma addons, but not all of them. If you need a mail client, you could use Mozilla Thunderbird.

On a default install of openSUSE 11.4 with KDE4, you will see these processes running:

 3826 ?        S      0:00 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_0
 3829 ?        S      0:00 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_1
 3830 ?        S      0:00 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_2
 3831 ?        S      0:00 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_3
 3832 ?        S      0:00 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_4
 3833 ?        S      0:00 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_5
 3834 ?        S      0:00 /usr/bin/akonadi_ical_resource --identifier akonadi_ical_resource_0
 3835 ?        S      0:00 /usr/bin/akonadi_maildir_resource --identifier akonadi_maildir_resource_0
 3836 ?        S      0:00 /usr/bin/akonadi_maildispatcher_agent --identifier akonadi_maildispatcher_agent
 3837 ?        S      0:00 /usr/bin/akonadi_nepomuk_contact_feeder --identifier akonadi_nepomuk_contact_feeder
 3839 ?        S      0:00 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_6
 3868 ?        SNl    0:01 /usr/bin/virtuoso-t +foreground +configfile /tmp/virtuoso_XM3727.ini +wait
 3876 ?        SNl    0:00 /usr/bin/nepomukservicestub nepomukbackupsync
 3877 ?        SNl    0:00 /usr/bin/nepomukservicestub nepomukremovablestorageservice
 3878 ?        SN     0:00 /usr/bin/nepomukservicestub nepomukqueryservice
 3879 ?        SNl    0:00 /usr/bin/nepomukservicestub nepomukfilewatch
 3882 ?        SN     0:00 /usr/bin/nepomukservicestub digikamnepomukservice

Akonadi is the storage service for KDE PIM and Nepomuk is the KDE Desktop Search.

Free memory (on a system with 512 MB), look at “free” and “cached”:

             total       used       free     shared    buffers     cached
Mem:        503328     496780       6548          0      12924     138600
-/+ buffers/cache:     345256     158072
Swap:       530108       1024     529084

Those akonadi and nepomuk processes will run all the time even if you don’t use KDE PIM and even if you disable Nepomuk from KDE Configure Desktop / Desktop Search. So the only known way to not run them is to delete the applications that need them.

There are two steps:

1. First off, disable Nepomuk like I said above. Then relogin into KDE.
2. After that, you start a Konsole, become root with “su -” and erase applications with this command:

rpm --erase akonadi-runtime kmail kaddressbook plasma-addons

Now look again at the memory status:

             total       used       free     shared    buffers     cached
Mem:        503328     497104       6224          0      14472     269504
-/+ buffers/cache:     213128     290200
Swap:       530108          0     530108

Around 130 MB has been freed. On a low memory system, it counts! You should know that the Linux kernel will rapidly allocate all free RAM for something useful like cache, and this is a good thing. However, when you open an application that demands memory (Firefox), the cache will decrease and the application will get what it needs. This could not happen easily if RAM was used by those akonadi processes. They would be eventually swapped out to disk if they are idle, but it’s definitely better to not run them at all…

Advertisements