Akonadi again

I posted an earlier thread on akonadi making the system unusable. I removed baloo-pim which made it somewhat better but still fairly slow - at least compared to some of my other computers which have 4GB of RAM. This computer - a 586 machine with the latest (standard) 13.2 version (all up-to date) with KDE desktop has only 2GB of ram and (default 2GB) swap space. As soon as I open Kmail (and start akonadi) the computer gets extremely sluggish. I sometimes have to wait for minutes to be able to move the mouse. The hard drive LED is on constantly and nothing happens on the desktop.
The top command reveals the following under VIRT:
akonadi_notes-a 1520600 (67.33% of memory)
akonadiserver 343664
akonadi_agent_1 106872
akonadi total 1971136
If I add mysql:
mysqld 447904
total 2419040
Do I read this correct that the virtual memory exceeds the set-up 2GB by over 400MB and the RAM is used up (more or less) at the same time? Then it is no surprise that the hard drive is running constantly and there are no system resources left. The computer runs well without akonadi/mysql if I leave Kmail off. Is my computer too low spec for this version of opensuse/kmail? can I do something to restrict its system resources?
Cheers
Uli

  1. you turned off indexing in config desktop right?? That should be sufficient to stop indexing
  2. Since baloo-pim is probable a recommended package it may have slipped back in check and if so taboo it

Thanks, gogalthorp, for your reply. Regarding turning indexing off - where do I do this? Baloo-pim is already taboo so it didn’t slip back in.
Cheers
Uli

OK, I tried KDE handbook - find funktion does not find indexing.
A web search to KDE turn indexing off didn’t turn up anything which applies to my setup. I have neither indexing in the file ~/.kde4/share/config/baloofilerc, nor do I find under System Settings “Desktop Search”. I don’t even know whether this is the problem when baloo-pim isn’t even installed. Maybe I have to look for a mail software which does not use akonadi?
Uli

Yeah you should. Akonadi itself can easily use 100+ Mb, but depends on usage. Is not light that is for sure, loads of sub processes or agents make it worse. Open System Monitor and look for processes - and activate/use columns “Memory” and “Shared Memory”, ignore “Virtual”. Add those 2 together and you have “Resident” memory though KDE would like you to focus on “Memory”. Is best case scenario but not all wrong, on a good day.

Only problem by killing Akonadi and taboo on its grave via Yast is https://userbase.kde.org/Akonadi#ApplicationTable You will have to figure that out. After much tweaking I did love Kmail and PIM stuff for a couple of weeks but Akonadi broke the relationship. Can say there is life after Kmail so you will get over the loss.

You can boot up KDE in under 250Mb memory usage if you fiddle enough. As with Akonadi usage will grow unless you just stare at black screen but still - with only 2Gb it seems silly to waste so much on things you might be able to compute without. You might be able to finetune Akonadi a bit by disabling Agents not used but tinker options are limited. Has a life of its own.

If you want to keep Akonadi and its hardcoded friends may be you need to reset it somehow. Force it to rebuild cache. Things can get corrupted so may be why it seems to act like Baloo or Super Fetch did in Vista? There are ways to do this and someone will tell you how. Akonaditray, Akonadi console, something like that.

Regarding usage. “mysqld” process is started by Akonadi so with that plus “Akonadi*” stuff it adds up. Baloo is sugar on top. Wonder what they were drinking or smoking all those years ago. Was it not about the time where Linux was such a nice option for an old computer which was to be thrown out anyway? 512Mb-1Gb range I guess. I blame KDE if I am confused :slight_smile:

Well, they used a database as cache to make certain stuff easier. Other mail clients (like Thunderbird) use a database (sqlite in this case) as well btw.

You can choose between 3 different backends in Akonadi’s settings, sqlite is an option too and doesn’t need mysqld running. But back then mysql was much faster (especially for larger mail accounts), so this is the default. Also there has been concurrency problems with sqlite, causing intermittent hangs, I don’t know how the current state regarding this is.
Run “kcmshell4 akonadi” to get to the akonadi server settings.

They currently plan to redesign and rewrite Akonadi from scratch (and work is underway already AIUI), to work without a central server and without a database. But that will take a while, a year at least I suppose.

Btw, I am using KMail/Akonadi (with a system-wide MariaDB server) here with “only” 2GiB RAM, and cannot confirm such freezes.
Maybe it’s possible that your MySQL configuration consumes too much RAM? Are you using an external mysql instance, or the internal one? MySQL or MariaDB?
(since 13.1, MySQL’s default setup takes a quarter of the available RAM here, that’s why I switched to MariaDB back then)

Tweaking that config might help.
If you are using an internal server, try to remove the file ~/.local/share/akonadi/mysql.config, to reset it to the current defaults.

And maybe also try to cleanup the akonadi database, with “akonadictl vacuum”.

Yeah, I was too fast with taboo instinct because cant know if Kmail and other PIM stuff is high priority or not. Well if not they should be killed. Baloo should also be killed if not in real use. The few other programs with Akonadi dependencies can be replaced with alternatives - or minor sacrifices. KDE works fine without any of Akonadi code even if not most announced feature.

Thunderbird with Lightning, RSS Reader and other extensions to make it a clued together PIM is not super light, much worse than Kmail on its own. But runs without Akonadi so less load overall.

Compared to Thunderbird KDE programs are being developed so that might encourage troubleshooting until KDE stuff behaves. A Mozilla guy recently said they have pulled out even more. Was a comment to a semi famous guy who wrote Thunderbird was doing a come back. Moz guy also said only chance to get a Mozilla email client for desktop is if they port an FirefoxOS version. Is how it works these days, not just in Android world. Linux distros are probably biggest customer because program is part of many default installs.

The indexing is controlled from configure desktop- desktop search

PS, I somehow overlooked this up to now:

So it’s actually the akonadi_notes_agent that hogs up your memory. (I think, your output is truncated…)
Haven’t ever had a problem with that…
AFAIK, that’s only needed to send/receive notes via the network. Try to kill it, and/or even put it offline/delete it in akonadiconsole.

Might be worth a bug report updstream at http://bugs.kde.org/.

OTOH, the VIRT usage is irrelevant. Better check the RES column, or did you?

For comparison, mysqld has 1GiB VIRT and 150MiB RES here (MySQL took 4 times the RES, that’s why I switched). Konqueror has 3GiB VIRT, and plasma-desktop even 4GiB. My system wouldn’t even run at all any more… :wink: (2GiB RAM and 2GiB swap)

So, thank you everyone who responded to my query. I was out all day and no much mucking around with the computer today. However I made a few changes and want to report on this, may be the more knowledgeable people here can tell me if I was correct with what I did.
FIrst, the only thing I found about stopping indexing is to change the file baloofilerc in ~/.kde4/share/config from Indexing-Enabled=true to Indexing-Enabled=false. Since there is no such line in this file I made the following entry (as they probably were in earlier versions of this file):
[Basic Settings]
Indexing-Enabled=false
The next thing I read about excluding indexing (since there is nothing more in System Settings) is that to exclude folders there should be the line “exclude folders=/home/user” in the file baloofilerc under the heading [General]. there was only “folders=/home/uli” so I changed this to “exclude folders=/home/uli”.
This could be the reason for the problem since I have the mount point for the NAS in my home directory (with a little script that mounts it at login). So if it tries to go through all the files in the NAS that would be quite a bit. I am also aware that if I stop indexing I don’t have to exclude my home folder but just to be sure… I further don’t know if this file has any effect since I deleted the file baloo-pim.
And mysql runs from the local computer and not from a server.
gogalthorp, where is configure desktop - desktop search? I come across these words in documentations but cannot find it on my system.
Now wolfi323, where is the Akonadi console (to delete akonadi_notes_agent). The only thing I have seen is in System Settings > Personal Information. But there I cannot do much. I could not find much documentation, most of it was old with config file entries which are different here/now and System Settings > Desktop Search which does not exist on my computers. So thanks again for the friendly people here at this Forum
So next time I open Kmail I will see what difference this will make and I will report back.
One more thing about Kmail, js9600. Since Edward Snowden published the documents on spying I have started to use as much as possible encrypted emails. I just want to make the point that I have the right to privacy even if I only write “happy birthday” to a friend. With Kmail that is very easy with GPG being fully integrated. From the email address Kmail knows which encryption key to use and it is only the additional button encrypt and it is done. If I would use Thunderbird I would have to install Enigmail as well. So I would prefer to stay with Kmail if possible.
Cheers
Uli

Might be a problem, yes.

I further don’t know if this file has any effect since I deleted the file baloo-pim.

File indexing has nothing to do with baloo-pim/PIM indexing and vice-versa.
Actually PIM indexing is not even related to Baloo, the indexer is just called akonadi_baloo_indexer for historical reasons…

And mysql runs from the local computer and not from a server.

My question was whether it is a system-wide mysql instance or akonadi’s internal one.
If it would run on an external server, it would not affect your memory usage in any way.

And again, do you have mysql or mariadb installed?
The default mysql settings use 4 times the memory here on my system, i.e. 512MiB out of 2GiB RAM here vs. ~128MiB for mariadb.
That’s why I switched to mariadb, and I’d recommend you to do the same.
I.e. install mariadb, this should uninstall mysql-community-server.

Your memory usage of mysqld would suggest that you run mysql with the default settings. But then, it’s still not clear whether you posted the VIRT or RES values. Again, VIRT is irrelevant, but should be much higher for mysql anyway than what you posted.

gogalthorp, where is configure desktop - desktop search? I come across these words in documentations but cannot find it on my system.

It is in the K-menu in “Favorites”. It might also be called “Systemsettings”, you can run it by entering “systemsettings” in a console.
You’ll find a “File Search” module there, where you can enable/disable file indexing, and/or exclude folders (not necessary/relevant if you disable it completely, excluding the home folder was the only way to turn off indexing in the firs Baloo release, as the settings module didn’t have an on/off switch).

Now wolfi323, where is the Akonadi console (to delete akonadi_notes_agent).

Enter “akonadiconsole” in a terminal window, or the Alt+F2 dialog.

The only thing I have seen is in System Settings > Personal Information. But there I cannot do much.

You can configure the Akonadi Resources there.
But the server settings are missing there since some time, you have to run “kcmshell4 akonadi” (as I wrote already) to get the full module including the akonadi server settings.

I could not find much documentation, most of it was old with config file entries which are different here/now and System Settings > Desktop Search which does not exist on my computers.

It should. Unless you uninstalled baloo-file as well. But in that case there’s no need to disable/configure it anyway…

Thanks wolfi323
Sorry I didn’t understand your question about mysql. mariadb is installed and mysql community server is not. Nevertheless mysql is running and hogging resources. And mariadb does not show at all under the top command in the console. What I posted were the VIRT results.
And you were right baloo-file was not installed. I installed it and Dektop Search was under System Settings.
I typed akonadiconsole and instantly the hard drive LED came on and didn’t stop and in the end I had to shut down the computer using the power button since for at least one minute there was no reaction even though I tried to throw it out of the GUI with ctrl+Alt+Backspace. The top command showed again mysql hogging resources
After the restart I ran kcmshell4 akonadi to configure akonadi. There Mysql is entered as database server. The drop-down menu shows PostgreSQL and SQLite as alternative, not mairadb. how do I switch to mariadb? And again since the Akonadi Configuration window opened the computer was unusable until I stopped the akonadi server.

I just tried to run akonadi again and (using top command) akonadi-notes-agent used 50% of the memeory, RES (whatever this means) was 995712 when the screenshot finally acted (it was higher before as well). wolfi323 you wrote previously to disable this akonadi-notes-agent - I deleted it now. And suddenly the problems seem to be much better. mysqld still uses some resources but it is certainly much better.

Even if that should not change much I would uninstall, then reinstall, everything with Akonadi and Baloo in name. Then you have done that. If the same it must be config files or something else. Would do this mainly because I would not be happy with that agent not working as it should - which is to sit almost idle.

Not sure you will loose account settings or not but should be otherwise be safe. Actually some doubts just popped up, might appear you have lost data and then what will happen next is good question :slight_smile: Research first and/or wait for wolfi323 or someone else to give more convincing tips.

I used embedded mysqld process and from memory it started at 55mb and grew to 120-130 tops depending on what I did with K stuff. Was never acting weird, but not what wolfi323 saw so he changed to external mysql/mariadb. If mysqld usage right now is in that range I think it is normal, you can declare that ok. Also fits what he got with external database.

Possible unrelated:
I am testing Gnome right now. First day entire shell would restart if I punched in a specific word in search box. Only 2 characters to be precise. Sometimes it would crash completely, well after I did it many times in a row to see what would happen :slight_smile: Turns out I had a couple of corrupted PSD files and one of them triggered issues with Gnomes Tracker thingy. Similar to Baloo. File had a name starting with the 2 characters I inputted - to launch a program not find PSD. I could see which file was a problem via “journalctl -f” so not hard to figure out - if you know how to. Had I not I would be a much more vicious Gnome 3 hater! But you see how little it takes to cause trouble. Not the same as problems cant be fixed.

MariaDB is a drop-in replacement for MySQL, created by the original MySQL developer even (after Oracle took over MySQL).
So yes, the process is named “mysqld” too.

What I posted were the VIRT results.

Again, they are irrelevant. RES is what counts.

And you were right baloo-file was not installed. I installed it and Dektop Search was under System Settings.

If you don’t have it installed, it cannot run or index anyway.

I typed akonadiconsole and instantly the hard drive LED came on and didn’t stop and in the end I had to shut down the computer using the power button since for at least one minute there was no reaction even though I tried to throw it out of the GUI with ctrl+Alt+Backspace. The top command showed again mysql hogging resources

So just starting Akonadi makes your system unusable?
Then you have serious problems. I never saw something like that here, not even in the first days of Akonadi.

After the restart I ran kcmshell4 akonadi to configure akonadi. There Mysql is entered as database server. The drop-down menu shows PostgreSQL and SQLite as alternative, not mairadb. how do I switch to mariadb? And again since the Akonadi Configuration window opened the computer was unusable until I stopped the akonadi server.

Again, if mariadb is installed, MySQL is actually MariaDB.

RES means “resident memory usage”.
And yes, if it shows 995712 Bytes (i.e. nearly 1 GiB) as RES, I would expect problems. And this is not normal…

Try to delete the file ~/.config/akonadi/agent_config_akonadi_notes_agent_changes.dat, those *_changes.dat files can cause problems if they are corrupted AFAIK.

wolfi323 you wrote previously to disable this akonadi-notes-agent - I deleted it now. And suddenly the problems seem to be much better. mysqld still uses some resources but it is certainly much better.

Of course does mysqld use resources. But it shouldn’t make your system unusable.
And if you are not actively using it (or Akonadi), the memory it uses gets swapped out anyway.

Reinstalling things doesn’t help normally.

I used embedded mysqld process and from memory it started at 55mb and grew to 120-130 tops depending on what I did with K stuff. Was never acting weird, but not what wolfi323 saw so he changed to external mysql/mariadb.

No, that’s not the reason why I changed to external mysql/mariadb.
I have/had mysql running as system-wide service years before Akonadi even existed.
So as it is running anyway, I use it for Akonadi as well (and Amarok), as to not have it running twice.

I did switch from mysql to mariadb (which is the default since 12.3 IIRC) though after upgrading to 13.1.

If mysqld usage right now is in that range I think it is normal, you can declare that ok. Also fits what he got with external database.

Yes.
Of course mysqld’s memory usage will change while it’s running. Sometimes it’s more, sometimes it’s less.
But it shouldn’t be a problem with Akonadi’s default settings, regardless whether you use mysql or mariadb.
If you are running an external, system-wide, server though, you will see that mysql’s default settings use much more RAM than mariadb’s. They can be tweaked/changed of course, but I never bothered to do that (as mariadb is openSUSE’s default anyway).

Thank you wolfi323. I deleted the file ~/.config/akonadi/agent_config_akonadi_notes_agent_changes.dat but there are plenty of other *dat files in this directory. I just checked with top again (remember I deleted Akonadi Notes Agent from System Settings > Personal Information Management > Akonadi Resource configuration). At first it was better but then again it slowed down. The top command showed the following ( I write down averages which I paste here):
mysqld 20% CPU 6% MEM 100000 RES
akonadiserver 9% CPU 1% MEM 17752 RES
akonadi_agent_1 5% CPU 2% MEM 11000 RES
akonadi-notes_agent 10% CPU 53% MEM 1.148g RES
Note that the akonadi_notes_agent hoggs memory and RES again even though it does not exist in the Akonadi Resource configuration.
I tried the following command: “ps -ef | grep akonadi” and found the line:
uli 2907 2832 2 11:01 ? 00:00:28 /usr/bin/akonadi_notes_agent --identifier akonadi_notes_agent
I killed process 2907 but the ps command shower that this notes_agent was back - now as process 5024. Whenever I killed it it came straight back. How can I get rid of this akonadi_notes_agent completely? I think my problem will be solved then>
Cheers and thank you
Uli

Yes, that’s normal.
Each resource/agent has such a changes.dat file.
Not that files are a problem, but I have read of problems when one of them got corrupted. Removing it should help in that case.

How can I get rid of this akonadi_notes_agent completely? I think my problem will be solved then>

Yes, it really looks like the akonadi_notes_agent is misbehaving badly on your system, but I have no idea why that would be.
And I have to admit I don’t know how to get rid of it either, except of deleting the executable /usr/bin/akonadi_notes_agent…

I would try to set it offline in akonadiconsole, maybe this helps already? (note that this probably will not free the currently used memory, but it would hopefully prevent it from using up that much memory again after a Akonadi restart)
This should also be remembered across reboots, unlike deleting an agent (the default ones are automatically added when they are not there).

And you should probably file a bug report about this issue at http://bugs.kde.org/.

I couldn’t find any place where I could set akonadi_notes_agent as offline in the akonadi console - may be because I deleted it in the Akonadi Resource configuration? At the moment (I deleted it 3 times - in System Settings, in the akonadi console and in the Akonadi Resources after running “kcmshell4 akonadi”) the akonadi_notes_agent does not come up as a process any more. Strange that it was still in these other 2 control windows after deleting it from the Akonadi Resource Configuration but the system at least is working and usable now. Will be interesting if it comes up again after a reboot. I haven’t deleted file /usr/bin/akonadi_notes_agent.

I filed a bug report - done this the first time so hope all the information required is there.
Cheers
Uli

Well, if you delete it, it isn’t there any more, so you cannot set it to offline either of course.
FTR, you would set it to offline by right-clicking on it in akonadiconsole’s “Agents” tab and choose “Toggle online/offline”.

At the moment (I deleted it 3 times - in System Settings, in the akonadi console and in the Akonadi Resources after running “kcmshell4 akonadi”) the akonadi_notes_agent does not come up as a process any more. Strange that it was still in these other 2 control windows after deleting it from the Akonadi Resource Configuration but the system at least is working and usable now. Will be interesting if it comes up again after a reboot. I haven’t deleted file /usr/bin/akonadi_notes_agent.

I’m not sure. I never tried to delete it.
But if you deleted it in one control window, it should be gone in all others as well (and in Akonadi itself).

Btw, I just had a look at it, in the settings window is an option called “Accept incoming notes” (on the network tab). Is this enabled or disabled on your system? Maybe try to disable that.