More Messaging Agent Tweaks
Posted 02-19-2010 at 05:05 AM by hdawg
A problematic messaging agent is the bane of any BES Administrator. I've previously blogged about implementing / tweaking the NumAgents and MaxUsersPerAgent registry keys ... well I've got one more for you. These tweaks are great if you've got a BES communicating with several Exchange servers and want to ensure that you have at least a single messaging agent for each server, or if you've got a heavily loaded BES and want additional agents to further spread out the load, but what if you've got a server with 500-1500 users (well within RIM's spec limit of 2000) and they're all on a single mailbox server?
For our example here, we'll look at a server with 1100 users. Our server will spawn a single messaging agent for 500 users, then spawn another for the next 500, and a final agent for the last 100. That said, BES is smart enough so it will balance those 1100 users across the 3 messaging agents it'll spawn ... but why only 3? Who wants ~367 users on a single messaging agent? I know I certainly don't.
Sure, we could use the MaxUsersPerAgent and NumAgents registry keys to set my MaxUsersPerAgent to 225 (1100/5=220 + a little growth room) and NumAgents to 5, but instead we can use the AgentOptimizeAlgorithm registry key and not have to worry about constantly changing the MaxUsersPerAgent key every time we add more users to the BES.
This key changes the load 500 users and then spawn a new agent process ... and instead spawns 5 agents by default and balances all the users across the agents. Sweet! Yes it is a wonderful tweak, but it can really really really screw you up if you use it wrong. The caveat to the use of this key is to ONLY USE IT ON A BES THAT HAS ALL OF ITS USERS ON A SINGLE EXCHANGE SERVER. I hope I was clear about that. The reason for the caveat is because once you implement the key the BES will spread ALL users across the agents evenly; regardless of their mail server. We certainly don't want to do that ... our goal should always be to only have users from the same Exchange server on any given messaging agent. Messaging Agents weren't made to be shared across mail servers; unless of course you like problems!
So we enable this key and restart our server (or just the Controller & Dispatcher) and BAM! ... our server starts up with 5 Messaging Agents and our 1100 users are evenly spread across 5 agents. It is always my goal to spread out users across as many agents as possible, to lessen the load for the agents, and provide as many resources as possible for each user on a BES. Now, I wouldn't go creating 50 Messaging Agents, but by setting this key we've decreased our average agent load from 367 to 220; a 40% decrease in load per agent!
This key disables the Complex Algorithm that is used by default (where it assigns users to an agent based on what mail server they're on) and instead implements the Simple Algorithm that spawns the 5 Messaging Agents and does an even distribution across all of them.
Ok, so here's the key and how to implement it. You're going to create a DWORD Value with the name of AgentOptimizeAlgorith and a Value data of 1.
For a 32-bit OS:
[HKEY_LOCAL_MACHINE\SOFTWARE\Research In Motion\BlackBerry Enterprise Server\Dispatcher]
"AgentOptimizeAlgorithm"=dword:00000001
For a 64-bit OS:
[HKEY_LOCAL_MACHINE\SOTWARE\Wow6432Node\Research In Motion\BlackBerry Enterprise Server\Dispatcher]
"AgentOptimizeAlgorithm"=dword:00000001
RIM put these keys and tweaks in place because there is value in them. Don't be scared with making these tweaks, just be informed!
For our example here, we'll look at a server with 1100 users. Our server will spawn a single messaging agent for 500 users, then spawn another for the next 500, and a final agent for the last 100. That said, BES is smart enough so it will balance those 1100 users across the 3 messaging agents it'll spawn ... but why only 3? Who wants ~367 users on a single messaging agent? I know I certainly don't.
Sure, we could use the MaxUsersPerAgent and NumAgents registry keys to set my MaxUsersPerAgent to 225 (1100/5=220 + a little growth room) and NumAgents to 5, but instead we can use the AgentOptimizeAlgorithm registry key and not have to worry about constantly changing the MaxUsersPerAgent key every time we add more users to the BES.
This key changes the load 500 users and then spawn a new agent process ... and instead spawns 5 agents by default and balances all the users across the agents. Sweet! Yes it is a wonderful tweak, but it can really really really screw you up if you use it wrong. The caveat to the use of this key is to ONLY USE IT ON A BES THAT HAS ALL OF ITS USERS ON A SINGLE EXCHANGE SERVER. I hope I was clear about that. The reason for the caveat is because once you implement the key the BES will spread ALL users across the agents evenly; regardless of their mail server. We certainly don't want to do that ... our goal should always be to only have users from the same Exchange server on any given messaging agent. Messaging Agents weren't made to be shared across mail servers; unless of course you like problems!
So we enable this key and restart our server (or just the Controller & Dispatcher) and BAM! ... our server starts up with 5 Messaging Agents and our 1100 users are evenly spread across 5 agents. It is always my goal to spread out users across as many agents as possible, to lessen the load for the agents, and provide as many resources as possible for each user on a BES. Now, I wouldn't go creating 50 Messaging Agents, but by setting this key we've decreased our average agent load from 367 to 220; a 40% decrease in load per agent!
This key disables the Complex Algorithm that is used by default (where it assigns users to an agent based on what mail server they're on) and instead implements the Simple Algorithm that spawns the 5 Messaging Agents and does an even distribution across all of them.
Ok, so here's the key and how to implement it. You're going to create a DWORD Value with the name of AgentOptimizeAlgorith and a Value data of 1.
For a 32-bit OS:
[HKEY_LOCAL_MACHINE\SOFTWARE\Research In Motion\BlackBerry Enterprise Server\Dispatcher]
"AgentOptimizeAlgorithm"=dword:00000001
For a 64-bit OS:
[HKEY_LOCAL_MACHINE\SOTWARE\Wow6432Node\Research In Motion\BlackBerry Enterprise Server\Dispatcher]
"AgentOptimizeAlgorithm"=dword:00000001
RIM put these keys and tweaks in place because there is value in them. Don't be scared with making these tweaks, just be informed!
Total Comments 1
Comments
-
Very good information. Thanks.Posted 02-19-2010 at 09:59 AM by cyclmpc












