Caching local resources

Ingo Klöcker kloecker at kde.org
Sat Sep 8 19:31:09 BST 2018


On Samstag, 8. September 2018 03:43:43 CEST Shridhar Daithankar wrote:
> On शनिवार, ८ सप्टेंबर, २०१८ १२:४८:४७ म.पू. IST Anders Lund wrote:
> > fredag den 7. september 2018 18.09.00 CEST skrev Shridhar Daithankar:
> > > On शुक्रवार, ७ सप्टेंबर, २०१८ ९:००:४७ म.उ. IST Anders Lund wrote:
> > > > Why? Disk space is not so expensive, and akonadi resources also
> > > > provides
> > > > lots of benefits, such as monitoring changes and providing uniform
> > > > access.
> > > > Since kmail bases access to mails on akonadi, I believe it is
> > > > completely
> > > > out of question in any case.
> > > 
> > > I am asking for disabling the caching, not the akonadi resources.
> > > 
> > > Unless akonadi resources cannot work without a cache?
> > 
> > AFAIK akonadi keeps track of metadata (such the headers nessecary), not
> > the mail bodies.

Akonadi also stores mail bodies below a certain threshold (I think the default 
is 4 KiB; this value can be configured in the database configuration file; 
this is a global setting, i.e. it applies to all resources) in the database. 
I'm not sure whether it also stores copies of larger mails outside of the 
database in its cache. The latter wouldn't be sensible for local resources.


> Which is ok, but this data does not need to be cached. It can be fetched
> everytime.

No. Akonadi caches headers that are necessary for displaying the list of 
messages in a folder. If this data wouldn't be cached then Akonadi would have 
to read all of the mails in a folder whenever you open this folder. Even with 
an SSD this would be magnitudes slower than reading the same data from a 
database table.


> The reason I am asking is, if feasible, I would like to file a feature
> request where akonadi caching can be disabled for local resources and can
> optionally be disabled for other resources.

It may be possible to reduce the amount of data that is cached. So, please 
file a feature request. The worst that can happen is that the Akonadi 
developers close it, if they think, it's not feasible.


> The later case applies where I run a local IMAP server.

This should be possible. Currently, Akonadi caches at least the most recent 
messages for IMAP resources.


> This will save space and processing as detailed in another message in the
> thread.
> 
> More importantly, I hope to get rid of several short-lived annoying data
> behehaviours of akonadi. There are too many of them to report and not all of
> them have reproduction, making the overall experience annoying enough.
> 
> If for nothing else, whenever somebody reports a problem and if it can be
> fixed by disabling caching, the devs can know which layer to look into. This
> could help in further debugging the problem.
> 
> And for the resources that benefit from caching, what is the procedure to
> resync the cache?

There may be other possibilities (I didn't see anything obvious in 
akonadiconsole, but maybe akonadictl has something), but, if you did not set 
lots of special settings for the folders (e.g. mail filters, identities, 
expiration or archiving options, etc.), then the easiest procedure is removing 
and re-adding the resource.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20180908/a929b255/attachment.sig>


More information about the kdepim-users mailing list