Thursday 24 July 2014

Finally, as promised, eventually: Fixing Akionadi over NFS

Firstly, apologies for the great lateness of this post.  I could say it was due to personal circumstances &c.; but I'll tell the truth for once, and say it was just me being a dizzy mare.

Anyway.  The scenario is this.  We have several clients running KDE, and using an NFS share for their home folder.  By default, Akonadi wants to run its own MySQL server, as the individual user, with data in the user's home folder.  Which means that every time a record needs to be modified, we have to lock a file  (to make sure only one process is going to modify it at once);  alter it; and then unlock it.  This is creating a lot of network traffic, as compared to just sending a query over the network, and it also has potential problems if the timing of all these messages gets messed up.

So the logical conclusion is, we need to have a central MySQL server for every user's Akonadi data, so the traffic is just queries and responses and we aren't relying on locking files on a remote server.  (If you read the first part of this story, you'll remember that this particular use case is actually violating assumption #3; this is a more complicated case than a simple home user, and there is someone in charge who ought to know better.)