[Dovecot] 1.0alpha4: pop3_reuse_xuidl patch

grant beattie grant at grunta.com
Tue Dec 6 22:35:10 EET 2005


On Tue, Dec 06, 2005 at 07:45:55PM +0200, Timo Sirainen wrote:

> On Fri, 2005-11-11 at 16:38 +1100, grant beattie wrote:
> > this is needed to make the pop3_reuse_xuidl option work in 1.0alpha4.
> 
> Committed to CVS finally.

cool, thanks :)

> > I am using maildir and I noticed that for each message which doesn't
> > have an indexed X-UIDL header, the entire message is read from disk.
> > as this is reading only headers, it is probably reasonable to stop
> > reading at the end of the headers.
> 
> I don't think it reads the message body because of that?
> 
> If message size isn't yet in cache file, the body needs to be read to
> get the correct size with CR+LF linefeeds.

ah, that makes sense then, I guess...

> > opinions? I haven't looked at the source enough yet to be able to do
> > this, but these two optimizations would vastly reduce the amount of
> > disk IO as a result of using this option.
> 
> Well, I originally thought the setting would only be used with mboxes
> since it's mostly for backwards compatibility, and with mboxes reading
> X-UIDL always is much cheaper. What maildir pop3 servers exist that
> don't use the filename or IMAP UIDs in some way for the UIDL?

I don't know if any exist, but in my case the mboxes were from a
qpopper installation, and they were converted to maildir when I
migrated to dovecot.

overall it has been a very pleasant experience :)

> Actually since the message size needs to be read anyway (unless you can
> get it to be written as W=1234 in maildir file), the X-UIDL lookup
> shouldn't cost anything since it's written to cache file immediately.
> Except I'm not sure if Dovecot's caching code currently is smart enough
> to save the X-UIDL header while saving message sizes..

ooh, so W=<size> will optimize away having to read the whole message?
that's great! I am currently using S=<size> (for Exim quota
calculation purposes), but I will switch to W= if it will reduce disk
IO :)

grant.



More information about the dovecot mailing list