[imp] Very large tables

Federico Giannici giannici at neomedia.it
Tue Aug 29 15:15:05 UTC 2017


On 08/29/17 12:53, Arjen de Korte wrote:
> Citeren Federico Giannici <giannici at neomedia.it>:
>
>> Hi!
>>
>> We are using Horde as WebMail for a few hundreds of users.
>>
>> In the last months I have noticed that the disks load (two SSD in
>> RAID1) is grown a lot. We use MySQL (actually MariaDB) as DB. I looked
>> at the tables and have noticed that there are two very large tables:
>>
>> - horde_vfs: 24G size, 74 thousands records
>> - horde_imap_client_message: 12G size, 6 million records!
>>
>> Are these sizes and number of records "normal"?
>
> Neither are purged automatically, so this may be normal.
>
>> Is there any mechanism to purge old records from these tables? Or they
>> will grow forever?
>
> You can use 'imp-query-imap-cache --lifetime <seconds>' to trim
> 'horde_imap_client_message'. Nothing will be lost, anything not in the
> cache will be retreived from the IMAP server again, possibly causing a
> slight delay.

Oh!
I didn't noticed that command.
I seems it's just what we were looking for...


> Regarding 'horde_vfs', it really depends on what is in there. It can be
> used for several things. Attachments and drafts can be stored there
> before sending and you may wish to trim very old entries. But it can
> also be used for more permanent storage, in which case trimming is
> probably not such a good idea. Things will be permanently lost, so be
> careful here, as it will p*ss off your users if you remove things they
> actually use.

Looking at the DB contents, it seems that this table is used at 99,9% 
for email composition, so I think we could safely delete the records 
older than a day.

The question is: can we safely simply delete entries from the horde_vfs 
table (filtering for vfs_path = ".horde/imp/compose")? No references 
will be broken in some other table?

Thanks



More information about the imp mailing list