Wednesday, June 23, 2010

How the Router allocates threads on a Domino server

Problem According to the Domino Release 5.x Administration Guide, if the "Maximum Transfer Threads" and / or "Maximum Delivery Threads" fields in the Server Configuration document are left blank...

"The Router sets a default maximum number of [transfer and delivery] threads based on server memory. Letting the Router select the maximum number is usually best."

Exactly what dictates how many transfer and delivery threads are used?

Solution: When these fields are set to blank, the router uses the size of the NSF Buffer Pool as a guideline for determining the maximum amount of threads to be used. This value can be altered by using the NSF_Buffer_Pool_Size NOTES.INI parameter*. If the parameter is not used, Domino will use the following amount of physical RAM for the NSF Buffer Pool (the amount allocated for the NSF Buffer Pool varies depending on the total amount of physical RAM on the machine).

*NOTE: Modifying the NSF Buffer Pool size should only be done on recommendation of Lotus Customer Support. This is especially important in Domino R5 because there are new algorithms in place that determine how much memory is allocated to the buffer pool.

The router sets an initial maximum of three (3) threads, and will use one (1) additional thread per 32MB of NSF Buffer Pool, with a maximum of twenty-five (25) threads. This calculation applies for both transfer and delivery threads, but it is done independently for each.

For example, an R5 Domino server, with 256MB of physical memory, and all default settings, will have the following resource allocation:

RAM = 256 MB
=> NSF Buffer Pool = RAM / 4 = 64 MB
Transfer Threads = Minimum Threads + Additional Threads
Minimum Threads = 3
Additional Threads = 64 / 32 = 2
=> Transfer Threads = 3 + 2 = 5

Hence, the router will use a maximum of five (5) Transfer Threads, and, following the same logic, five (5) Delivery Threads.

NOTE: The transfer threads on the Server Configuration document can be overridden by using the NOTES.INI setting MailMaxThreads=. The order for which the transfer threads are set: first the INI files are searched for the MailMaxThreads parameter, then the Server Configuration document, and if still not defined, will be calculated using the resource allocation formula.

Examples using the resource allocation formula:

Physical Memory

Buffer Pool

Delivery Threads

64MB

16MB

3

128MB

32MB

3+1=4

256MB

64MB

3+2=5

512MB

128MB

3+4=7

1GB

256MB

3+8=11

2GB

512MB

3+16=19

>2.8GB

25


The maximum number of transfer or delivery threads is configured using the above resource allocation formula and will be between 3 and 25. It is possible to increase the number of threads past the maximum default of 25 manually. However, increasing these threads past 25 could cause some performance issues if the hardware resources are not available to handle the configured number of threads.

No comments:

Post a Comment