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

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 06-14-2009, 08:08 PM
Elite Member
 
Posts: 296
Default Create 30000 accounts as quick as possible?

Dear All,

for a urgent testing case, we need to create thousands of accounts in ZCS and do email-sending test. I'm running a script something like below for this purpose :

while [ $count -le 30000 ]; do
zmprov ca guest$count$mydomain 111111
done


but it's kind of slow.
Can anyone provide is there fast way to create 30000 accounts in ZCS?

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 06-14-2009, 09:17 PM
Moderator
 
Posts: 6,237
Default

Every time you run zmprov or zmmailbox, it has to crank up a new JVM thread which is a lot of overhead; however, you can run it in batch mode.
ie: It would be better to aggregate a list of actions and then send them all to one instance of zmprov:

Quote:
nano /tmp/script.sh
Code:
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 30000 ]; do
echo "ca testing$COUNTER@domain.com password" 1>>/tmp/provision.txt
let COUNTER=COUNTER+1 
done
chmod 744 script.sh
./script.sh
zmprov < /tmp/provision.txt
Or zmprov -f /tmp/provision.txt

Infact it may be faster to do it via LDAP directly (zmprov -l < provision.txt) instead of mailboxd/Java/SOAP; though I haven't done an analysis in this case - some commands will need to talk to the mailbox server anyways.

Just ran it on a vm with 512mb ram ~1ghz proc dedicated to it (ZCS 6.0.0 D2, all default settings, no Java/LDAP tweaks):
- Less than 30sec to make the .txt
- Creates roughly 10k accounts every 10 minutes (ran zmaccts every so often in other terminal)

Last edited by mmorse; 06-14-2009 at 10:22 PM.. Reason: stats
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.