facts about resource usage of an empty and unused Akonadi

Martin Steigerwald martin at lichtvoll.de
Mon Sep 3 20:52:38 BST 2018

Draciron Smith - 03.09.18, 13:30:
[… smemstat figures … ]
> As you can see it chewed up 250 megs, an eighth of the machine's
> memory just starting up. MySQL alone was 150 megs. Which is odd since
> I don't remember MySQL having that heavy a footprint. Leave it

First off: Is this *guaranteed* an empty and unused Akonadi setup? Please
check size and contents of ~/.local/share/akonadi. Maybe there are some
left overs.

To make sure "rm -r ~/.local/share/akonadi" (make backups first in case
you are not sure!) or test with a newly created user. I was only talking
about an empty and unused Akonadi as that is the use case for those who
do not like to use Akonadi.

mysqld is using a lot more than on my attempt with Debian. Maybe standard
InnoDB buffer pool size has been raised. I recommend to raise it for better
performance since a long time. Hmmm, interesting it is


for Akonadi 17.12. I wonder why RAM usage had been lower in my Akonadi
test with a test user. Anyway, you can get rid of that by switching to SQLITE
driver. AFAIR was 64 or 80 MiB with earlier versions of Akonadi.

For mobile variant of Akonadi it is:


Yes that is right Akonadi is available on mobile devices like smartphones
and tablets with Plasma Mobile.

> sitting for a few hours and it is consuming 8 times that much RAM.

2 GiB of RAM and more?

Do you have numbers for that? If so… I recommend you write a bug report. I
never saw this happening.. A bug report would be especially helpful if you
can pinpoint the processes responsible for the memory increase by comparing
before and after smemstat output. I´d grep to Akonadi processes instead
of displaying all the processes in the system. My fathers laptop has an
empty and unused Akonadi that never has been an issue. I never measured
its memory use as I just had no reason to do it. And that laptop ran for
half a day or more due to me not switching it off immediately after
completing backup operation.

If that is really happening with an empty and unused Akonadi, that is a bug.
Period. What version of Akonadi do you use? Here it is 17.12.

Even my production Akonadi does not use that much memory.

Here for example my production Akonadi after days of usage:

% smemstat | head -1 ; smemstat | grep -v "QtWebEngine" | egrep "(mysqld|akonadi)"
   PID      Swap       USS       PSS       RSS D User       Command
  2463     0,0 B  1183,7 M  1183,7 M  1186,6 M   martin     /usr/sbin/mysqld
  3041     0,0 B   193,7 M   194,2 M   206,7 M   martin     /usr/bin/akonadi_maildir_resource
  3043     0,0 B    25,7 M    26,6 M    40,1 M   martin     /usr/bin/akonadi_mailfilter_agent
  3057     0,0 B    19,3 M    19,9 M    33,5 M   martin     /usr/bin/akonadi_sendlater_agent
  3055     0,0 B    17,9 M    18,9 M    35,6 M   martin     /usr/bin/akonadi_pop3_resource
 27478     0,0 B    12,9 M    14,2 M    30,2 M   martin     /usr/bin/akonadi_maildispatcher_agent
  3054     0,0 B  8084,0 K  8785,0 K    22,3 M   martin     /usr/bin/akonadi_pop3_resource
  3053     0,0 B  7964,0 K  8663,0 K    22,2 M   martin     /usr/bin/akonadi_pop3_resource
  3044     0,0 B  6756,0 K  7203,0 K    18,4 M   martin     /usr/bin/akonadi_mbox_resource
  3049     0,0 B  6932,0 K  7183,0 K    16,4 M   martin     /usr/bin/akonadi_notes_agent
  3030     0,0 B  6336,0 K  6883,0 K    19,8 M   martin     /usr/bin/akonadi_followupreminder_agent
  3048     0,0 B  6400,0 K  6827,0 K    17,5 M   martin     /usr/bin/akonadi_newmailnotifier_agent
  3033     0,0 B  5708,0 K  5834,0 K    12,8 M   martin     /usr/bin/akonadi_icaldir_resource
  2446     0,0 B  5700,0 K  5802,0 K    12,3 M   martin     /usr/bin/akonadi_control
  3036     0,0 B  5456,0 K  5646,0 K    12,9 M   martin     /usr/bin/akonadi_kalarm_resource
  3040     0,0 B  5436,0 K  5598,0 K    12,6 M   martin     /usr/bin/akonadi_kalarm_resource
  3038     0,0 B  5432,0 K  5594,0 K    12,6 M   martin     /usr/bin/akonadi_kalarm_resource
  3025     0,0 B  5232,0 K  5396,0 K    12,7 M   martin     /usr/bin/akonadi_akonotes_resource
  3027     0,0 B  5156,0 K  5289,0 K    12,5 M   martin     /usr/bin/akonadi_birthdays_resource
  3024     0,0 B  4992,0 K  5154,0 K    12,4 M   martin     /usr/bin/akonadi_akonotes_resource
  3029     0,0 B  5020,0 K  5153,0 K    12,2 M   martin     /usr/bin/akonadi_contacts_resource
  3046     0,0 B  4996,0 K  5121,0 K    12,2 M   martin     /usr/bin/akonadi_migration_agent

(note I stopped akonadi_indexing_agent due to the resource usage issues I
mentioned: It generates to much disk I/O and MySQL load for my taste.)

(for some reason some unrelated QtWebEngine processes were in the output,
so I grepped them out of it)

mysqld is my choice. I set it InnoDB buffer pool size to 1 GiB.

The other akonadi processes do not use all that much memory. Of that maildir
resource uses the most, but it deals with quite something:

% du -sh .local/share/local-mail 
19G     .local/share/local-mail

% find .local/share/local-mail -type f | wc -l

Yes, thats right, almost 1,5 million mails in about 19GiB. I think 193,7 MiB
is not too much to handle this.

The other processes are pretty much like with the empty and unused Akonadi.

So with a mysqld with standard InnoDB buffer pool size even my production
Akonadi would not use 8 times the memory of an empty and unused Akonadi
a few minutes after startup. In fact it would easily be below 1 GiB of
memory usage. And that is with a heavily used Akonadi! Heck, even with more
than 1 GiB for mysqld it does not use 2 GiB or more on my system.

> Leave it sitting a couple days and unknown problems happen as I have
> to mash down the power button to get the machine to respond any more.
> Put it under a normal load and it just goes away for a long time.

This is definitely not normal behavior of Akonadi.

> The reason the thread started was somebody asked how to disable
> Akondi. Which should be something you can do from the control panel.

I agree with that. Feel free to go for convincing KDEPIM developers.

> Instead it requires a bit of digging on Google and a few mins in a
> console window. This is 2018. A lot of Linux users today are not
> sysadmins and power users. There would be a lot more if Linux

A machine with 4 GiB of RAM or more is not exactly power user related
I think. I wonder whether you can buy a laptop or PC with less these days
in Germany anymore. Even used laptops usually have more.

However in other countries that may be different and I agree with you,
being able to disable it easily would be good. But I do not see it as my
call to go for it as I use Akonadi and even on my fathers laptop where
Thunderbird is in use, that empty and unused Akonadi never has been an
issue. I never thought about disabling it. Actually I think I never thought
about it *at all*.

As for user friendliness of Linux: You can complain here as much as you
want. It won´t change anything however. Especially I think here no KDEPIM
developers are reading. So you either go for helping to fix usability
issues as you see them. Or you need to wait till others do it.

If you are serious about things, I´d bring this up with the bug tracker or
at least kdepim-users mailing list. If you are not, there IMHO is not much
point to continue the discussion. So I may spare myself the time for any
further reply.


More information about the kde mailing list