ctl_mboxlist with unified mupdate config

Brian Awood bawood at umich.edu
Wed Oct 15 13:53:24 EDT 2008

I've been looking into issues that ctl_mboxlist has with the unified 
mupdate config.  One thing we've noticed after upgrading our proxy 
servers to 2.3 running in unified mode is that running "ctl_mboxlist -m" 
was quite slow.  We do have over 1M mailboxes, but it can take ~6-7min to 
run which seemed rather long even for that many mailboxes.  

The problem stems from when ctl_mboxlist gets it's list of mailboxes that 
the mupdate master thinks it should have.  It uses the config_servername 
as it's prefix arg to the LIST command.  Since the proxy machine doesn't 
host any mailboxes, the mupdate master doesn't return anything.  This 
ends up causing ctl_mboxlist to do a individual FIND for each mailbox in 
it's local copy of the db.  It seems like the correct behavior for 
ctl_mboxlist in a unified mupdate config would be for it to do LIST 
without args so it gets back all of the mailboxes that the mupdate master 
has.  I tested this change and it brought the run time down to ~30sec.

This has some side effects though, since ctl_mboxlist generally assumes 
that mailboxes listed in the local database are hosted locally and 
mailboxes from mupdate that aren't listed locally should be removed from 
mupdate.  So for this change to be made, additional checks would need to 
be added to determine if the mailbox is local or remote and then "do the 
right thing".  It seems like this could generally be described as the 
local database is only authoritative if the mailbox is local, otherwise 
the mupdate master is authoritative.  

Are there any thoughts on what the "right thing" is or how ctl_mboxlist 
should behave in a unified config in general?  I'll open a report in 
bugzilla with a patch, but I'd like to get an idea of what other people 
think or if anyone else is even using/interested in unified mupdate. 

Brian Awood
University of Michigan

More information about the Cyrus-devel mailing list