migrate-metadata performance

Ian G Batten ian.batten at uk.fujitsu.com
Tue Oct 9 09:20:02 EDT 2007


Looking at the migration script, it's essentially find . -name  
cyrus.* -exec mv {} /meta/part/{} \;.  That's quite slow, because it  
has to stat() all the messages to find the files which are metadata.   
I've written an alternative for the migration we're planning for  
later this week, which uses ctl_mboxlist -d to find all the mailboxes  
and then looks explicitly for the named files, which avoids stat()ing  
the messages.    It's a bit rough at the moment: for example, it  
assumes the old, single-initial-letter hashing scheme, but reducing  
the amount of time the mail system has to be down for an upgrade is  
always worthwhile!

ian






More information about the Info-cyrus mailing list