I recently ran into an issue where users were reporting that messages to their Blackberry handhelds were being delivered in clumps, and were also extremely delayed. These are symptoms of a Blackberry Server rescan. We were running BES 5.0.2 and Exchange 2010 SP1. We upgraded the BES to 5.0.2 MR4, but the issue remained.
This essentially means that the BES server cannot keep up with email delivery, and thus cannot deliver the emails as they arrive. It is forced to queue them, and deliver them in chunks.
I had already configured the Exchange 2010 throttling policy as per Blackberry’s documentation:
So throttling wasn’t the issue. The issue ended up being that the BES server was only creating one mailbox agent in the BES server. This has to do with the DAG model in Exchange 2010, and the way around it is to create static mailbox agents for EVERY user, or force the BES server to create multiple mailbox agents. We can do this with two registry keys. The first one:
HKLMSoftwareResearch In MotionBlackberry Enterprise ServerDispatcher
If it is not there, create a DWORD named MaxUsersPerAgent and set the decimal value to the maximum number of users per agent, in my case 40 users:
The second registry edit is:
HKLMSoftwareResearch In MotionBlackberry Enterprise ServerAgents
If it is not there, create a new DWORD with the name MaxMailboxesPerSession and set the decimal value to the value that you want the maximum number of mailboxes to be piped through a single MAPI session. This is separate from the agent above. For instance, I set mine to 35, which means at the 36th mailbox, the BES will create a new MAPI session.
After you make those changes, restart your BES server. After making the above changes, your performance should increase, and you should see extra instances of the BlackberryAgent.exe process:
Just an FYI, SQL Express and MSDE are limited to five agents on the server. For more agents, you will need to be using SQL Standard or higher, and edit the key:
HKLMSoftwareResearch In MotionBlackberry Enterprise ServerAgentsNumAgents and change its decimal value to a number higher than 5:
Again, this value will be ignored higher than a value of 5 on SQL Express and MSDE. If you have 1000 users, and you set the MaxUsersPerAgent value to be 40 as above, your agent breakdown will be as follows:
BlackberryAgent (1) = 40 Users
BlackberryAgent (2) = 40 Users
BlackberryAgent (3) = 40 Users
BlackberryAgent (4) = 40 Users
BlackberryAgent (5) = 840 Users
So be careful to set the MaxUsersPerAgent value appropriately for your environment if your limited to the number of agents.
As for the BES server itself, we saw slightly higher memory utilization due to the extra agents (around 400 MB), but much lower CPU usage.
Hope you guys find this helpful!