[Dovecot] More efficient Deleting of a whole folder (or Purging Trash)

Benjamin R. Haskell dovecot at benizi.com
Thu Jan 31 01:24:39 EET 2008


On Wed, 30 Jan 2008, Gabriel Millerd wrote:

> On 1/30/08, Ed W <lists at wildgooses.com> wrote:
>>
>>
>> Just get a small shell script to run `touch ${rand_file}` 35,000 times
>> and  time it.  Then drop into your shell and do rm -rf on the folder
>> (for bonus marks you could purge the disk cache before doing this).
>> This gives you a benchmark on your hardware separately to what dovecot
>> offers.  Take that number and lets work from there...  Shouldn't take
>> too long to do something like this?
>>
>
> Plus indexing work (or quota ... ewww), I wouldn't know if Dovecot
> updates and index after every action or what have you. I think Unix
> picks up most of the resource juggle here
>
> Off topic, in the end Dovecot is insanely fast, especially with the
> LDA to write to indexes on the delivery side and using the custom file
> name hints for pop3 and what have you. If the index is not known and
> imap is out of the blue told to Examine() and Delete(...) and
> Expunge() there might be a significant difference.
>
> Making a perl script to insert 35k emails using dovecot deliver
> doesn't impact my under resourced machines and I work with
> spam/(false|ham|queue) system with mail::imapclient automation and the
> script flies through thousands of messages on the hour without notice.
>

Did you then delete those 35K messages in one fell swoop? I wouldn't be 
surprised if XFS's performance were significantly different between 
these exaggerrated extremes:

repeat 35000 times: { create a file, delete a file }

and

create 35000 files, delete 35000 files

Best,
Ben


More information about the dovecot mailing list