[kdepim-users] How to disable mail indexing with Akonadi search

Martin Steigerwald martin at lichtvoll.de
Mon Feb 8 15:21:02 GMT 2016

Am Montag, 8. Februar 2016, 10:15:55 CET schrieb Daniel Vrátil:
> On Saturday, February 6, 2016 7:35:17 PM CET Martin Steigerwald wrote:
> > Back in Baloo times it was easy to disable mail indexing. But with Akonadi
> > Search which as I understand is basically a renamed Baloo for mail stuff I
> > didn´t find a way yet. Can one disable it?
> You can prevent the Indexer from starting by modifying /usr/share/akonadi/
> agents/akonadindexingagent.desktop, unsetting "AutoStart" capability.

Thank, Dan. I think that would be at the self-compiled location for me.

Okay, found it as akonadiindexingagent.desktop :). I didn´t find any Autostart 
parameter in there, so I set "Autostart=false".

> You use maildir, so the main suspect why the IO goes crazy is that when
> indexing is triggered, we are forced to upload all the mails to Akonadi and
> index it, then Akonadi expires the data again and they are removed from the
> database - so you get maildir READ + DB write, then DB read, then Xapian
> write (super-IO-intensive) and again DB write (delete) - I suppose this
> together adds up to some insane IO numbers.

Sounds like a way to even keep SSDs busy, yet I think its not even that. I 
didn´t observe 100% utilization on one or both of the SSDs.

What puzzled me a bit is that mysqld was around 100% CPU usage for minutes, 
yet didn´t use more than 100% of CPU.

> I am aware that this is extremely inefficient and I have a plan how to
> improve performance for local email massively by allowing direct access to
> the local remote storage by resources and applications with Akonadi only
> storing the usual metadata and path to the actual end-storage files
> (instead of the actual data). Unfortunately I don't know when I'll get
> around to start working on it. If you have some time and feel like helping,
> just get in touch ;)

I may have a tiny chunk of time here and then, I don´t know whether thats 
sufficient to do anything useful. Maybe I can at least look at the code and 
try to understand how it works. I did a major performance fix with maildir 
handling before but with a lot of guidance by Sergio and others. Just I still 
don´t understand what calls what, where it decides it wants to synchronize and 
so on. (I just suspect that also there is does more work than needed. So would 
like to understand it.)

Maybe if I start by looking at the code and probably document my understanding 
on how it works. If I decide so, where do I need to look? Maildir resource? 
Any hints on what to read or browse to gain some confidence to do something 
useful with the code?

Maybe I can also start with a junior task: Add a resource config option to 
disable it :)

May ping you on IRC one of next days :)


More information about the kdepim-users mailing list