Domino R5 does a good job of automatically managing memory resources, and in many cases, you need not concern yourself with memory management issues. There are a couple NOTES.INI variables, however, that can help you fine-tune management of memory resources in certain situations. This month, we'll take a look at both of them.
Q. What NOTES.INI variables can help me manage memory resources in Domino?
You have different options, depending on which version of Domino you are using.
If you want to control memory allocation in Domino Release 5.0.4 or later, you can use the new PercentAvailSysResources variable. With PercentAvailSysResources, you can determine how much system memory each Domino partition gets and reserve memory for other applications.
If you are running Domino 5.0.3 or earlier, you can employ the NSF_Buffer_Pool_Size variable in certain circumstances. For example, partitioned servers should have the NSF_Buffer_Pool_Size variable set in the NOTES.INI file of each partition. However, on most non-partitioned servers, Domino's default memory allocation scheme for the NSF buffer pool works quite well. For this reason, and because the setting can affect other performance parameters, use of the NSF_Buffer_Pool_Size variable is discouraged on most non-partitioned servers.
Let's take a look at some details about these two variables.
In Domino Release 5.0.4 or later, you can control the amount of memory allocated to your server by using the PercentAvailSysResources variable.
Before the introduction of this variable in 5.0.4, each Domino server assumed it had 100 percent of system memory available to it. With the PercentAvailSysResources variable, you assign a portion of memory to the server by specifying a value from 2 to 100, which represents a percentage of a system's total physical memory. For example, if you want to dedicate 75 percent of system memory to Domino, add the following line to the NOTES.INI file:
This effectively leaves 25 percent of memory for other applications. To follow through with the example, a Domino server on a system with 256MB of RAM and the NOTES.INI setting PercentAvailSysResources=75 would reserve 192MB for itself .
You can also allocate memory on partitioned servers using the PercentAvailSysResources variable. For example, if you have a Domino server with two partitions and want to control the memory resources allocated to each partition, you could set the NOTES.INI of Partition 1 with the line PercentAvailSysResources=60 and the NOTES.INI of Partition 2 with the line PercentAvailSysResources=40. In this case, Partition 1 would use 60 percent of the system memory resources and Partition 2 would use 40 percent. Make sure that the sum of the values you specify in each partition does not exceed 100 percent.
To reserve system memory for other applications, you can choose values that total less than 100 percent.
Another use for PercentAvailSysResources is with a Citrix MetaFrame or Windows terminal server. For example, if there are 20 data directories on the terminal server, then the NOTES.INI file in each client data directory could contain the parameter PercentAvailSysResources=5. This limits each user on the terminal server to only 5 percent of the server's system memory.
Note: If you use the PercentAvailSysResources variable, you should not use the NSF_Buffer_Pool_Size variable described below unless Lotus Support recommends it.
The PercentAvailSysResources variable in Release 5.0.4 and later is the preferred method for controlling memory allocation in Domino. For Domino releases prior to 5.0.4, you can enhance memory allocation by using the NSF_Buffer_Pool_Size variable-but only in certain areas and under particular circumstances.
The NSF_Buffer_Pool_Size variable has a more narrow purpose than PercentAvailSysResources. It lets you specify the maximum size of the NSF buffer pool, a section of memory dedicated to buffering I/O transfers between the NIF (Notes Index Facility) indexing functions and disk storage. By changing the value of NSF_Buffer_Pool_Size, you can control the size of the memory section used for buffering. (You can also use NSF_Buffer_Pool_Size_MB to set the size of the pool. This variable performs the same function as NSF_Buffer_Pool_Size, but lets you specify the size in megabytes instead of bytes.)
If your Domino applications use indexing, it is tempting to think that you can simply increase the size of the NSF buffer pool and dramatically enhance server performance. However, just as adding physical memory to a system does not always boost performance, designating a bigger NSF buffer pool might not produce dramatic results. (For details about the Iris Performance Team's NSF buffer pool research, see the Iris Today article, "Optimizing server performance: Port encryption & Buffer Pool settings.")
In fact, Domino does a good job by itself of allocating memory to the NSF buffer pool by calculating a default setting based on fixed overhead and total memory available. (Depending on the Domino version and other factors, the default usually amounts to between 25 percent and 33 percent of system memory). What's more, changes to the NSF buffer pool allocation algorithm in R5 mean that the Domino server uses only the amount of memory it needs, up to the default or specified amount. The R4 strategy pre-allocated and reserved the entire default or specified amount of memory. For example, in R5, when you specify a value of 10,000 for the buffer pool size and only 5,000 is needed, only 5,000 is allocated. In Domino R4, if you specify a value of 10,000 for the buffer pool size and only 5,000 is needed, 10,000 is allocated
Both Iris and Lotus technical support recommend that you let Domino handle NSF buffer pool allocation and stick with the default setting the program generates. There are exceptions to this rule, however. Under Domino releases prior to 5.0.4, the following servers should have the NSF_Buffer_Pool_Size specified in the NOTES.INI:
You should specify NSF buffer pool size on all partitioned servers. Each partition should have the variable set in its NOTES.INI file, so that multiple partitions do not cumulatively starve the system of memory by each taking too big a piece of the pie. The rule of thumb is to take 30 to 35 percent of the amount of physical RAM, divide that value by the number of partitions on the machine, and use the resulting number as the NSF buffer pool setting for each partition. This is just a starting point; you can tweak each partition according to how it uses Domino.
Servers with more than 5GB of physical memory
In an installation with more than 5GB of physical memory, one of the two NSF buffer pool variables should be set in the NOTES.INI for the Domino server. It is worth noting that the NSF buffer pool setting in R5 up to and including 5.0.3 should not exceed 1920MB (or 2,013,265,920 bytes).
On the AS/400, we recommend setting NSF_Buffer_Pool_Size for both partitioned and non-partitioned servers. Why? On OS/400, Domino servers run out of their own storage pool, which is typically changed dynamically by the auto-performance adjuster (WRKSYSVAL QPFRADJ). If you do not set NSF_Buffer_Pool_Size, Domino calculates an NSF buffer pool value based on the total memory on your AS/400, not on its share of the storage pool.
Note: If you have Domino Release 5.0.4 or later, you should use the PercentAvailSysResources variable to allocate memory on the AS/400.
On S/390 servers, each Domino partition is allocated 512MB of memory, regardless of the amount of physical memory on the system. Thus, the default setting for the NSF buffer pool will always be calculated as a percentage of 512MB. You can let Domino size the NSF buffer pool using its default calculation, or you can specify the size in the NOTES.INI of each partition. This latter approach is recommended. Note that only the remaining memory (512MB minus the specified NSF buffer pool value) will be available for the rest of Domino.
To summarize, Domino developers recommend implementing the PercentAvailSysResources NOTES.INI variable to control memory allocation. For releases prior to 5.0.4, where PercentAvailSysResources is not available, there are some scenarios where setting the NSF_Buffer_Pool_Size variable can prove useful.
If you employ any of these NOTES.INI variables, test server performance to see if you get the results you expect. The number of users, size and number of views, and number of databases all factor in when determining what the settings should be. And remember to review the settings when system configuration changes or after upgrading the system to a new Domino release, because it is likely that you will need to adjust them.
Do you have a NOTES.INI questions? Send it in to Professor INI. We'll answer as many questions as we can in future "Ask Professor INI" columns. Keep in mind, however, that we may not be able to answer every question, nor can we quickly respond to requests that require immediate attention. If you need an immediate response to a question, we recommend you post it in the Notes/Domino Gold Release forum where someone from the general Notes community might be able to help, or contact Lotus Customer Support.