[horde] IMP IMAP DB Cache backend lifetime

Arjen de Korte arjen+horde at de-korte.org
Fri Sep 1 14:35:54 UTC 2017


Citeren Joao S Veiga <jsveiga at rf.com.br>:

> ----- Message from Jens Wahnes <wahnes at uni-koeln.de> ---------
>
>> Joao S Veiga wrote:
>>> Even with very few users, without Frederico's suggestion the cache  
>>> in the database will grow forever if not manually cleared (and the  
>>> imp-query-imap-cache doesn't help much for old messages/metadata).
>>>
>>> So for the sql cache to properly work in any case, there should be  
>>> a way to expire them, as he suggested.
>>
>> I agree that Horde should be able to clean up the mess it created.  
>> ;-) But then, OTOH, the Horde configuration already comes with a  
>> big "NOT RECOMMENDED" message regarding usage of a SQL database for  
>> caching, so go figure.
>>
>
> There is a "NOT RECOMMENDED" for sql in the "Horde Cache"  
> configuration option; is that what you mean? My "Horde Cache" uses  
> the "File" driver, which is not marked "NOT RECOMMENDED".
>
> But we're talking about the "IMP IMAP Cache", which can use the  
> "Horde Cache" (not recommended), or hashtable/nosql/sql  
> (recommended) according to imp/backends.php:
>
>  *     - 'cache': Caching is enabled using the Horde cache (configured in
>  *                horde/config/conf.php). It is recommended to use either
>  *                'hashtable', 'nosql', or 'sql' instead, as these backends
>  *                have better performance.
>  *     - 'hashtable': Caching is enabled using the Horde HashTable driver
>  *                    (configured in horde/config/conf.php).
>  *                    The 'cache_lifetime' parameter (integer) can be
>  *                    specified to define the lifetime of the cached message
>  *                    data.
>  *     - 'nosql': Caching is enabled using the Horde NoSQL database
>  *                (configured in horde/config/conf.php).
>  *     - 'sql': Caching is enabled using the Horde SQL database  
> (configured in
>  *              horde/config/conf.php).
>
> Is this information incorrect, and the "IMP IMAP CACHE" shouldn't  
> use sql either? In my set up (about 50 users, some with 2GB+ inboxes  
> and 20GB+ mailboxes) using MYSQL as the IMP IMAP Cache greatly  
> improves the response, with not much impact in CPU usage (I do see  
> mysql using a little CPU after I completely wipe out the cache but  
> that's expected); but I'm comparing to not using caching at all.

I see the same observation. I only have a few dozen users and in that  
case there will be huge improvement if you use configure IMAP cache  
'sql' compared to no caching at all. I also tried 'hashtable' and  
'nosql' but neither showed a noticeable improvement over 'sql'. In  
this case, I actually prefer to use 'sql' for everything, as I need it  
anyway on this system and it saves running multiple databases / caches.

> Do you have a reason for not recommending sql for the "IMP IMAP  
> Cache", or you thought we were referring to the "Horde Cache"?

I have the feeling that for small installations, configuring an IMAP  
cache is more important that which type you use.

> Thanks,
>
> Joao





More information about the horde mailing list