Friday, June 24, 2011

BES AgentOptimizeAlgorithm

I had been long looking for the feature to distribute agents evening to speed up mailbox scanning processing particular after we upgrade Exchange 2003 to Exchange 2007 a couple years ago. I was always told that sorry we cannot do that by RIM support. Finally I got the postive answer from RIM by editting register key.
 
By default, if you run MSDE, BES only supports two dynamic agents per server. If you run Full MS SQL edition for BES database, you can run as many as 20 agents (RIM recommends you should run less than 10 agents per BES). BES assigns users to agents per Exchange servers and up to 400 users per agent. Since we had migrated all 5000 user mailboxes to one Exchange 2007 CCR server, for about 700 users per BES HA, by default, it will allocate 400 users for two dynamic agents, the message delivery significantly delays whenever we failover BES (it could take about two hours to complete the sync) that made BES failover useless.
 
Now that after we have implemented AgentOptimizeAlgorithm, and changed from two agents to five agents for 800 users per HA server, message delivery delay has been reduced from 2 hours to 15 minutes.
 
Also if you use Exchange 2010, BES basically sees the CAS as the mailbox with 2010 (instead of the actual mailbox server the user is on, assuming you have installed the CAS on a separate server). Because of this, if you have multiple CAS behind a load balancer, it throws the "keep users from the same exchange server on the same BES" rule out. This is our situation and the guidance given to us by RIM is to implement the AgentOptimizeAlgorithm to 1 (simple algorithm) to randomly assign users to an Agent instead of keeping an Agent to one mail server:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Research In Motion\BlackBerry Enterprise Server\Dispatcher.
DWORD value is 1 - the simple algorithm is used.
DWORD value is 2 - the complex algorithm is used.
The Default value is 2. a complex algorithm, Note: if you don't see the key, create the REG-Dword key.
 
Enabling Simple Messaging Agent Distribution Algorithm
 
The distribution algorithm can be changed with the DWORD registry key AgentOptimizeAlgorithm located in
32 bit - HKEY_LOCAL_MACHINE\SOFTWARE\Research In Motion\BlackBerry Enterprise Server\Dispatcher.
64bit - HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Research In Motion\BlackBerry Enterprise Server\Dispatcher.
DWORD value is 1 - the simple algorithm is used.
DWORD value is 2 - the complex algorithm is used.
The Default value is 2.
 
If the registry key does not exist, create it.
 
No advanced logic is used in this process.
 
BlackBerry smartphone users are simply distributed evenly across the number of agents specified in the DWORD registry key NumAgents located in:
32bit - HKEY_LOCAL_MACHINE\SOFTWARE\Research In Motion\BlackBerry Enterprise Server\Agents.
64bit - HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Research In Motion\BlackBerry Enterprise Server\Agents.
Default value is 5, do not increase it higher than 10.
Note: If the above registry keys do not exist, they need to be created.
 
Note: A maximum of 2 Messaging Agents will be created if the configuration database is on Microsoft SQL Database Engine (MSDE).  Move the configuration database to SQL 2005 Express using KB03112.
 
 After talking with RIM on this one, it is my understanding that if you are completely Exchange 2010 or 2007 (instead of mixed mode with 2003) and you have implemented EWS using the traittool on the global level (and not per server or agent) then you can completely uninstall MAPI since it is no longer being used (KEEP CDO THOUGH!). Of course I would test in a lab first, but this is what I intend to do after we are finished migrating to 2010.
 
Note: We run BES 5.0.3 HA with Intel Powerful processors (16 virtual processors with 32 GB RAM)

No comments:

Post a Comment