Saturday, October 15, 2011

Remove Akonadia in Kubuntu

Having to make a decision on where to go with using Linux without using Unity led me back to KDE. Initially I installed Kubuntu 11.04 and was pleased with several of the features but when I upgraded to 11.10 I encountered severe issues.

I liked Kmail until I did the upgrade, unknowingly I had several backend issues due to changes in the KDE PIM suite, all caused by Akonadi.

From Wikipedia Akonadi is is explained as:

Akonadi is a storage service for personal information management (PIM) data and metadata named after the oracle goddess of justice in Ghana. It is one of the “pillars” (core technologies) behind the KDE SC 4 project, although it is designed to be used in any desktop environment. It is extensible and provides concurrent read, write, and query access.

Akonadi provides unique desktop-wide object identification and retrieval.[3] It functions as an extensible data storage for all PIM applications. In KDE 3 each PIM application had different data storage and handling methods, which led to several implementations of essentially the same features. Besides data storage, Akonadi has several other components including search, and a library (cache) for easy access and notification of data changes.

Akonadi communicates with servers to fetch and send data instead of applications through a specialized API. Data can then be retrieved from Akonadi by a model designed to collect a specific data (mail, calendar, contacts, etc.). The application itself is made of viewers and editors to display data to the user and let them input data. Akonadi also supports metadata created by applications.

Because Akonadi takes care of data storage and retrieval, which are traditionally the difficult parts of creating a PIM application, development of PIM applications is made much easier. In fact, the Mailody developer Tom Albers demonstrated how a mail reader could be created in only 10 minutes using Akonadi.

That's all fine and dandy, except for one huge and very important detail, its murder on the CPU resources. My duo core did not drop below 93% the whole time it was active. It severely affected my network speed, graphics, disk and memory access. When I setup Clam and Spamassasin in Kmail it bogged down so bad I couldn't use it. To make matters worse I couldn't shut it down without killing any KDE PIM service to boot. Finally, in Kubuntu anyway, removing it via apt would remove half of KDE as well. Oh I was not pleased by this.

There was no doubt Akonadi had to go. I removed all KDE PIM applications, which irked me bad because I did want them, but they were useless to me with Akonadi completely tied to them. Installed Thunderbird and manually removed all Akonadi bin files in /usr/bin/ and removed the akonadi folder in /usr/share/ (kdesu dolphin can do wonders)

Result is my average CPU state is back down below 10% when I'm not running intense Multimedia or graphic applications and still well below 50% when I do. In other words I can run my computer normally and not worry about overheating my CPU which Akonadi was definitely doing.

This is an example of a good idea badly implemented and released prematurely. If Akonadi stopped indexing and scanning its data base when PIM applications didn't need the service then it might have been useful. But between it and Neopuk there was no downtime for the CPU. Since I use a laptop that's just absolutely unacceptable. Bad enough there is still a power management bug in the Linux Kernel causing issues, I sure don't need a data base indexer causing even more of an issue and killing my battery even faster.

Yes I am staying with KDE (Kubuntu) but I won't be using Kontact. Which really is a shame because Thunderbird does not replace it completely. However, i can read my email, setup functional spam filtering and anti-virus scanning without making computer bog down so much that a 486 using Windows XP actually runs faster.

I'm all for shared resource technology, it makes a lot of sense. However, it shouldn't eat up resources like Akonadi does.


Anonymous said...

Thanks for this article :)

Anonymous said...

One of the best reasoned and expressed rationales I have seen for removing akonadi/nepomuk. I agree 100% and have followed your instructions for disabling and removing the elements. It's a pleasure to have my computer back.