13

I recently installed kubuntu 16.04 on my Dell studio xps 1640 that has 8GB of Memory installed. Everything is working fine but Something is really bothering me. After a fresh boot up, when i check the system resources, mysqld occupies about 150~200MB of RAM and a bunch of akonadi services are running(contacts, birthday,mail*, sendalter & ...) and i really don't need and use any of these services and it's a waste of Memory. But the serious problem is with mysqld, after a while(3-4 hours) mysqld occupies about 800MB~1GB of RAM and it won't release that until i reboot the system. I should mention that i don't have any running databases and don't use mysql at all! So only ubuntu is using that.

So my Question is that:

  • First, how can i disable (remove) the unwanted akonadi services and don't let them to autostart and run at all (I disabled akonadiserver but didn't help). The only service that I'm using from akonadi is krunner and i really don't need the kMail, Calendar and ... .

  • Second, why mysqld is taking this amount of memory(although i guess its related to the akonadi issue mentioned above because the Parent of mysqld process is akonadiserver) and how can i prevent it. because my work is related to RAM usage and i really need the Memory so i can't let that unwanted services use this amount of resource.

I really appreciate it if you would help me to fix this problem. Thanks in advance for your kind help.

7 Answers 7

11

Until ubuntu provides a fix for this problem, i found a workaround!

I use the command pkill -f akonadi and add it to the startup. System Settings>>Startup & Shutdown>>Autostart. using this command all the akonadi services get killed at startup and mysqld process will be killed along with it and all the memory occupied by them will be released.

after this everything works normally and i found no errors or missfunctionalities whatsoever.

Removing akonadi services

Using command sudo apt-get remove --purge kmail akonadi-server you can uninstall akonadi-server and all it's integrated services without any harmful changes to the system. this way memory usage goes under 500MB and mysqld won't run and take resources.

7

I had the same problem, and although I don't know how to uninstall akonadi, I uninstalled the applications that make usage of it: kontact, kaddressbook, kmail, knotes and korganizer. Akregator doesn't seem to start akonadi so I let it installed.

sudo apt-get remove kontact kaddressbook kmail knotes korganizer

My memory usage had decreased from almost 900MiB to less than 500MiB after the startup thanks to akonadi not being started. As akonadi is not started, neither it is that mysqld process that ends wasting more than 800MiB after a while (making a total memory usage of 1.5GiB with no any other program running).

If you don't want to uninstall this applications, you can close them all from the system tray. In my case there were running kmail and korganizer. In the case of korganizer, you have to uncheck the option of reminding events from its icon in the system tray (I think it appears as events reminder daemon, or something similar). This way, next time you boot the computer, this processes won't be initialized and akonadi won't be started.

But be aware, starting any of this applications just once will start akonadi until you shut down the computer, it's not killed when you close the application (note: you can stop it from the terminal with 'akonadictl stop').

2
  • 3
    thanks for the insight, actually i managed to remove akonadi with all the integrated services using this command: sudo apt-get remove --purge kmail akonadi-server this way you don't need to worry about kde-shell calling the services
    – Firouziam
    Apr 29, 2016 at 13:42
  • Thanks. After reading your comment I did the same and my computer is still running OK.
    – naggety
    May 3, 2016 at 7:13
5

If you want to disable the services instead of removing them to avoid future dependency issues, You can just disable them by editing the configuration file.

To disable the server, edit the akonadi server configuration file at ~/.config/akonadi/akonadiserverrc.

Change StartServer=true to StartServer=false.

1

This is fixed in MySQL 5.7.13 (see Bug 80772): https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-13.html#mysqld-5-7-13-bug

This fixed it for me.

At the moment the highest version available through apt is 5.7.12 so to get 5.7.13 you can use one of the options here: https://dev.mysql.com/downloads/mysql/

Take your time though. I used the MySQL PPA to install and rushed the whole thing and now I've broken Akonadi in Kubuntu. Which it seems is hard to fix.

0

I encountered this problem too and pkill is a little bit brutal I think

Since I'm not using any akonadi dependent applications I make a akonadictl stop when mysqld get too much weighted. It will not restart until I launch something like Kmail, Kontact, what means never ! Unfortunately it will resume on reboot. I didn't found any solution to fix that parmanently

1
  • yeah stop will work but you have to do that every time you reboot or even sometimes while using os! in my case because i didn't use any of it's services, i removed the packages and i encounters no problems doing that.
    – Firouziam
    May 8, 2016 at 20:21
0

Just for reference: This is considered a mysql bug and tracked in https://bugs.launchpad.net/bugs/1576930

So far the answer from Firouziam is the correct workaround for those that do not use kdepim.

0

You could also switch to SQlite3 as a backend.

While this is officially unsupported, there are reports that it reduces the memory foot print.

a howto can be found here: https://shevchuk.co/notes/2018/03/04/reduce-akonadi-memory-usage-to-40-mb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.