Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-12-2009, 04:13 PM
Intermediate Member
 
Posts: 15
Default [Migration] Imapsync TOO slow.

Well, i'm currently in the process of migrating many mboxes (1TB total) into zimbra's mail format.

After reading and investigating I got to know imapsync, which is supposed to be the best way for migrating user's mail. So I decided to give it a try with my own mailbox, whose size is 1.4GB.

The first imapsync I've launched throwed these statistics (the last 3 lines are the output of time):

++++ Statistics ++++
Time : 8000 sec
Messages transfered : 74163
Messages skipped : 0
Total bytes transfered : 1446676706
Total bytes skipped : 0
Total bytes error : 56010292
Detected 9 errors
Please, rate imapsync at imapsync | freshmeat.net

real 133m20.374s
user 8m20.417s
sys 0m27.247s


133 minutes for the first imapsync looked like veeery slow. But I was shocked when, 4 hours after and without any load on Servers I resynced again both imap's (remember they were synced 4 hours ago and they only have 40 mails for transfer).

I then got these horrible results:

++++ Statistics ++++
Time : 17063 sec
Messages transfered : 404
Messages skipped : 73774
Total bytes transfered : 4771170
Total bytes skipped : 1441129069
Total bytes error : 56010292
Detected 9 errors
Please, rate imapsync at imapsync | freshmeat.net

real 284m22.895s
user 11m18.068s
sys 0m22.968s


Yep, 284 MINUTES for just 404 messages (4mb)!

I must say my mailbox is stored at a NAS and our current IMAP server is mounting it via NFS. It's important to say that while doing these tests NAS CPU Usage and IMAP Server load average never reached high levels. Also, Zimbra store remains locally on a PowerEdge 2950 with 10k RPM SAS disks.

In order to speed it up a little bit (ha, ha, ha) I didn't even use SSL for IMAP.

All these tests were done under RHEL 5 x86_64 and imapsync 1.99.

Does anyone have any clues on how could I speed up this process ? Or any alternate way of migrating from mailbox to zimbra ?!

Regards,
Reply With Quote
  #2 (permalink)  
Old 08-12-2009, 06:06 PM
Outstanding Member
 
Posts: 708
Default

2 hours for a gig is quite good.

All configurations are different, but the second run shouldn't have taken more than a half hour.

Where is imapsync itself running? It needs a lot of RAM.

Have you given imapsync a --header option? I don't remember what the default is. I'd imagine that fetching an unindexed header from Zimbra's imap would require reading the actual message files and be slow.

Look at zmstat-chart. It's something like zmstat-chart -d /opt/zimbra/jetty/webapps/zimbra/downloads -s /opt/zimbra/zmstat and then you can see various info at http://server/downloads/index.html. There are some wiki articles about zmstat.
Reply With Quote
  #3 (permalink)  
Old 08-12-2009, 06:59 PM
Intermediate Member
 
Posts: 15
Default

Thanks Rich for your reply.

The server is a PE2950 with 8GB of RAM with two quad-core.

I don't see a --header option at imapsync, but i DO notice an option named "--skipheader":
--skipheader : Don't take into account header keyword
matching ex: --skipheader 'X.*'


I don't know if that's the option you were talking about.

zmstat gave nice info, good one =). As far as I can see, processors get a max of 20% load each while doing imapsync. Also, during sync Disk I/O throughput reached 800kb/s avg, which seems to be very low for such a server. I don't think hardware is being a limitation over here, at least that's my first impression!

You say that maybe imapsync is fetching an unindexed header from Zimbra's imap. Is there any way I can force that indexation ?

Thanks again and again =)

Quote:
Originally Posted by Rich Graves View Post
2 hours for a gig is quite good.

All configurations are different, but the second run shouldn't have taken more than a half hour.

Where is imapsync itself running? It needs a lot of RAM.

Have you given imapsync a --header option? I don't remember what the default is. I'd imagine that fetching an unindexed header from Zimbra's imap would require reading the actual message files and be slow.

Look at zmstat-chart. It's something like zmstat-chart -d /opt/zimbra/jetty/webapps/zimbra/downloads -s /opt/zimbra/zmstat and then you can see various info at http://server/downloads/index.html. There are some wiki articles about zmstat.
Reply With Quote
  #4 (permalink)  
Old 08-13-2009, 08:24 AM
Trained Alumni
 
Posts: 46
Default

Two imapsync options that help a lot with speed are --nosyncacls and --nofoldersizes. I'm usually seeing 1 GB of mail transferred in under an hour, but imapsync definitely depends on how many threads you're running in parallel and what kind of box you're running it on (consider doing the imapsync on a 3rd box between your two mail servers instead of on them directly).
Reply With Quote
  #5 (permalink)  
Old 08-13-2009, 08:36 AM
Outstanding Member
 
Posts: 708
Default

What I was thinking of before was --useheader.
Reply With Quote
  #6 (permalink)  
Old 08-13-2009, 09:00 AM
Intermediate Member
 
Posts: 15
Default

I don't have those options available on imapsync 1.99:

Unknown option: nosyncacls
Unknown option: nofoldersizes
Unknown option: useheader


I have uploaded to a public folder zmstat results:

zmstat Aug 12, 2009

I will try to use different versions of imapsync in order to check if there are those options available.

Regards!
Reply With Quote
  #7 (permalink)  
Old 08-18-2009, 09:55 AM
Active Member
 
Posts: 46
Default

1. Here are you running the imapsync from? on Zimbra / on old server / on a client system?
2. What is the iowait on the old server when you run imapsync?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.