Welcome to Port3101.org : Your BES Connection Mark forums read | View Forum Leaders
Port3101.org : Your BES Connection



Reply
LinkBack (1) Thread Tools Display Modes
KB04909 - Threading model for Domino BES 4.x
 
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-15-2009, 11:45 AM
hdawg's Avatar
Proprietor
 
Join Date: Nov 2008
Posts: 2,238
Blog Entries: 147
Default KB04909 - Threading model for Domino BES 4.x

KB04909 - Threading model for BlackBerry Enterprise Server software version 4.0 and 4.1 for IBM Lotus Domino

Environment


  • BlackBerry® Enterprise Server software version 4.0 and 4.1 for IBM® Lotus® Domino®
  • SDR71932



Overview

Background

The BlackBerry Enterprise Server assigns threads to handle specific operations (for instance, sending a message to a BlackBerry smartphone, or wirelessly synchronizing a delete action on the BlackBerry smartphone).
By default, there are 40 threads that service each BlackBerry Enterprise Server instance. Each IBM Lotus Domino messaging and collaboration server has its own pool of threads. The BlackBerry Enterprise Server uses one thread to service one BlackBerry smartphone on the messaging server and uses two threads for two or more BlackBerry smartphones on the messaging server.
These threads are non-removable. They cannot be reallocated to optimize every cycle. For example, a thread pool with two BlackBerry smartphones cannot have one thread. The number of non-removable threads varies depending on the number of IBM Lotus Domino messaging servers that the BlackBerry Enterprise Server services and the number of BlackBerry smartphones in each thread pool. Non-removable threads are independent of the maximum number of threads available.
The following examples show possible scenarios that explain the use of non-removable threads.
Example 1
This BlackBerry Enterprise Server instance services 10 IBM Lotus Domino messaging servers.
Number of BlackBerry smartphones per IBM Lotus Domino messaging server Number of non-removable threads per IBM Lotus Domino messaging server Total number of non-removable threads
5 IBM Lotus Domino messaging servers, each having 1 BlackBerry smartphone 1 non-removable thread per IBM Lotus Domino messaging server 5 non-removable threads
3 IBM Lotus Domino messaging servers, each having 2 BlackBerry smartphones 2 non-removable threads per IBM Lotus Domino messaging server 10 non-removable threads in total for 5 IBM Lotus Domino messaging servers with multiple BlackBerry smartphone users
2 IBM Lotus Domino messaging servers, each having 5 BlackBerry smartphones 2 non-removable threads per IBM Lotus Domino messaging server
For the configuration above, there are 15 non-removable threads in total. This leaves 25 remaining threads to be optimized between the remaining IBM Lotus Domino messaging servers that have more than two BlackBerry smartphones.
Example 2
This BlackBerry Enterprise Server instance services 30 IBM Lotus Domino messaging servers.
Number of BlackBerry smartphones per IBM Lotus Domino messaging server Number of non-removable threads per IBM Lotus Domino messaging server Total number of non-removable threads
30 IBM Lotus Domino messaging servers, each having 20 BlackBerry smartphones 2 non-removable threads per IBM Lotus Domino messaging server 60 threads in total
In this configuration, no threads remain to be optimized between the IBM Lotus Domino messaging servers because there is a total of 40 threads by default.
Note: In this example the number of non-removable threads exceeds the default of 40 threads. Since non-removable threads are independent of the total number of threads available, there can be any number of non-removable threads.

Registry entries

The following three DWORD Value registry entries (with Decimal values) can be used to change the thread allocation between thread pools:
  1. AltThreadModel: The AltThreadModel key is also not created at install and must be created to be changed. This registry entry reverts back to the former threading model. Only one thread pool exists for all BlackBerry smartphone users rather than having one for each IBM Lotus Domino messaging server. This registry key can be set to one of the following values:
    0 = Old threading model (one thread pool for all mail servers)

    1 = Default current model (one thread pool per mail server)

    2 = Extended threading model (multiple thread pools per collection of mail servers). For more information on the extended threading model, see KB13404.
  2. MaxTotalThreads: This registry entry has a default value of 40. This registry entry can be increased to allow for more threads to be allocated between thread pools. It is useful when BlackBerry smartphone users experience slow or unsuccessful email message delivery.
  3. NumWorkerThreads: This registry key is not created by default. It is used only during BlackBerry Enterprise Server startup. Upon startup, a maximum of five threads can be allocated to each thread pool if the key is absent and the number specified is present.
Note: Each registry entry should be created in the following location:
For Windows® 2000/2003 (32bit)

HKEY_LOCAL_MACHINE\Software\Research In Motion\BlackBerry Enterprise Server\Agents
For Windows 2003 (64bit)

HKEY_LOCAL_MACHINE\Software\Wow6432Node\Research In Motion\BlackBerry Enterprise Server\Agents
For example, if a thread pool has between one and five BlackBerry smartphones, the BlackBerry Enterprise Server will allocate the same number of threads as BlackBerry smartphones. If a thread pool has more than five BlackBerry smartphones, the BlackBerry Enterprise Server allocates 5 threads.
The following example shows a possible scenario that explains thread allocation.
Example
The tables below indicate the number of BlackBerry smartphones and the number of threads allocated to the BlackBerry Enterprise Server at the startup for each thread pool.
Note: Each letter represents a separate IBM Lotus Domino messaging server.
IBM Lotus Domino messaging servers Number of BlackBerry smartphones Number of threads during startup (before optimization)
A 1 1
B 2 2
C 3 3
D 4 4
E 5 5
F 10 5
G 15 5
H 20 5
I 25 5
J 30 5
10 IBM Lotus Domino messaging servers in total 115 BlackBerry smartphones in total 40 threads in total
The BlackBerry Enterprise Server has a total of 115 BlackBerry smartphone users divided between 10 IBM Lotus Domino messaging servers. At startup, before optimization has occurred, there are 40 threads.
After optimization occurs, there are 19 non-removable threads because there is one thread pool with one BlackBerry smartphone user (IBM Lotus Domino messaging server A) and nine IBM Lotus Domino messaging servers (B through J) with multiple BlackBerry smartphone users. The remaining 21 threads will be optimized between the thread pools that require them.
IBM Lotus Domino messaging servers Number of BlackBerry smartphones Number of threads during startup (after optimization)
A 1 1
B 2 2
C 3 2
D 4 2
E 5 2
F 10 2
G 15 2
H 20 2
I 25 2
J 30 2
10 IBM Lotus Domino messaging servers in total 115 BlackBerry smartphones in total 19 threads in total



Effects of changing registry entries

When increasing the maximum number of threads and the number of threads specified during startup, it may be useful to create the MaxTotalThreads and NumWorkerThreads registry entries. These registry entries can reduce slow response times, but can affect BlackBerry Enterprise Server performance. Therefore, it is critical to determine the best values for each BlackBerry smartphone user.
The following examples show scenarios that explain the effect of changing registry entry settings.
Example 1
This BlackBerry Enterprise Server instance has the following values for the two registry entries:
  • MaxTotalThreads = 200
  • NumWorkerThreads = 20
During startup, a total of 247 threads are started. This number is reduced to the number defined by the MaxTotalThreads registry entry after optimization. The number of worker threads before optimization can be calculated (as shown in the following table).
If there are between one and twenty BlackBerry smartphones in each thread pool, the same number of threads is started as the number of BlackBerry smartphones. If there are more than twenty BlackBerry smartphones for each thread pool, only 20 threads are started.
The following table shows that, before optimization, there are 561 worker threads (of which 126 threads are non-removable).
Number of worker threads Before optimization
3 Thread pool for IBM Lotus Domino messaging server A has 2 threads to serve 3 BlackBerry smartphones
1 Thread pool for IBM Lotus Domino messaging server B has 1 thread to serve 1 BlackBerry smartphone
6 Thread pool for IBM Lotus Domino messaging server C has 2 threads to serve 6 BlackBerry smartphones
1 Thread pool for IBM Lotus Domino messaging server D has 1 thread to serve 1 BlackBerry smartphone
4 Thread pool for IBM Lotus Domino messaging server E has 2 threads to serve 4 BlackBerry smartphones
20 Thread pool for IBM Lotus Domino messaging server F has 5 threads to serve 43 BlackBerry smartphones
19 Thread pool for IBM Lotus Domino messaging server G has 3 threads to serve 19 BlackBerry smartphones
12 Thread pool for IBM Lotus Domino messaging server H has 2 threads to serve 12 BlackBerry smartphones
20 Thread pool for IBM Lotus Domino messaging server I has 3 threads to serve 25 BlackBerry smartphones
20 Thread pool for IBM Lotus Domino messaging server J has 3 threads to serve 25 BlackBerry smartphones
1 Thread pool for IBM Lotus Domino messaging server K has 1 thread to serve 1 BlackBerry smartphone
5 Thread pool for IBM Lotus Domino messaging server L has 2 threads to serve 5 BlackBerry smartphones
...etc. ...etc.
561 worker threads in total After optimization, there are 200 worker threads (of which 126 are non-removable).


Example 2
This BlackBerry Enterprise Server instance has the following values for the two registry entries:
  • MaxTotalThreads = 200
  • NumWorkerThreads = not set
Upon startup, a total of 247 threads are started. This number is reduced to the number defined by the MaxTotalThreads registry entry after optimization. The number of worker threads before optimization can be calculated. This is shown in the first column of the following table.
If there are between one and five BlackBerry smartphones on each thread pool, the same number of threads is started as the number of BlackBerry smartphones. If there are more than five BlackBerry smartphones for each thread pool, only five threads are started.
Number of worker threads After optimization
3 Thread pool for IBM Lotus Domino messaging server A has 2 threads to serve 3 BlackBerry smartphones
1 Thread pool for IBM Lotus Domino messaging server B has 1 thread to serve 1 BlackBerry smartphone
5 Thread pool for IBM Lotus Domino messaging server C has 2 threads to serve 6 BlackBerry smartphones
1 Thread pool for IBM Lotus Domino messaging server D has 1 thread to serve 1 BlackBerry smartphone
4 Thread pool for IBM Lotus Domino messaging server E has 2 threads to serve 4 BlackBerry smartphones
2 Thread pool for IBM Lotus Domino messaging server F has 2 threads to serve 2 BlackBerry smartphones
3 Thread pool for IBM Lotus Domino messaging server G has 2 threads to serve 3 BlackBerry smartphones
4 Thread pool for IBM Lotus Domino messaging server H has 2 threads to serve 4 BlackBerry smartphones
1 Thread pool for IBM Lotus Domino messaging server I has 1 thread to serve 1 BlackBerry smartphone
4 Thread pool for IBM Lotus Domino messaging server J has 2 threads to serve 4 BlackBerry smartphones
5 Thread pool for IBM Lotus Domino messaging server K has 6 threads to serve 50 BlackBerry smartphones
5 Thread pool for IBM Lotus Domino messaging server L has 6 threads to serve 52 BlackBerry smartphones
...etc. ...etc.
247 worker threads in total After optimization, there are 200 worker threads (of which 126 are non-removable).
__________________
http://blog.port3101.org/hdawg/

The views expressed by me on Port3101 and its affiliated sites are my own and do not necessarily reflect the views of my employer.
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.port3101.org/featured-blackberry-kb-articles/1486-kb04909-threading-model-domino-bes-4-x.html
Posted By For Type Date
BES 4.x Threading Model - Blogs - Port3101.org : Your BES Connection This thread Refback 04-02-2011 12:49 AM


All times are GMT -4. The time now is 07:29 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.


 

SEO by vBSEO 3.3.2 PL2