Long startup time (1h 30m)

Dennis Sjogren dempa at du.se
Fri Oct 8 05:49:59 EDT 2004


Greetings!

More info on the subject:

In cyrus.conf:

START {
   # do not delete this entry!
   recover       cmd="ctl_cyrusdb -r"
   # this is only necessary if using idled for IMAP IDLE
   idled         cmd="idled"
}

Observe the comment "do not delete this entry". Now, looking at the code 
  in ctl_cyrusdb.c, one can clearly see why this is taking so long. When 
the argument -r is passed along, the function recover_reserved() is 
executed. This function does the following:

     /* build a list of mailboxes - we're using internal names here */
     mboxlist_findall(NULL, pattern, 1, NULL,
                      NULL, fixmbox, NULL);

Now, this must mean that for ALL mailboxes on the system (remember, 
about 10k users here), the function fixmbox() is executed, right? This 
function executes the following:

     r = mboxlist_detail(name, &mbtype, &path, &part, &acl, NULL);

The result of this operation is parsed and various actions are taken 
depending on the result.

Anyway, going through every single mailbox on the system can't really be 
efficient? I would really like a developer comment on this. Of course, 
I'm not at all familiar with the code in general, and there may be 
design decisions beyond my understanding, so please feel free to flame 
me! ;)

Joking aside, can all this be avoided somehow?


Best regards,

/dempa

-- 
  Dennis "Dempa" Sjogren, Unix Sysadmin / Software Developer
  Dalarna University, Borlange Campus, Sweden - http://www.du.se/
  Free electronic music available at: http://dempa.init5.net/
  "Everytime I close my eyes, the noise inside me amplifies" - A23
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list