Notes.ini Entry



Name:

    MEM_AddressableMem

Syntax

    MEM_AddressableMem=0 / 1

Applies to:

    Servers

Add-on:


    First Release:

      7.0

    Obsolete since:


      Category:

        Performance

      Default:

        None

      UI equivalent:

        None

      Description:
      Mem_AddressableMem/Mem_AddressableMemSizeMB - introduced in ND7, this parameter behaves in a similar fashion to PercentAvailSysResources, in that it affects the size of the UBM, but does not actually enforce an overall limit to shared memory usage. It differs from PercentAvailSysResources in that it takes into account the user address space size on each platform for a 32-bit process

      There is now code in Domino which, when enabled, will instruct Domino to pre-allocate shared memory at startup, thus preventing the possibility of the server "crashing" with an error of the type "Error attaching to shared memory" or "Error on mapping memory" during extended Domino server operation. This is due to the fact that at Domino startup, we will immediately allocate/map in our maximum amount of useable shared memory and never again create any more shared memory, thus preventing the possibility of a later process allocating shared memory that other processes cannot map into their address space. The downside of this is that we will always automatically use up this amount of virtual memory for shared memory and thus will be capped on available local memory based on the addressable memory available to Domino on the operating system.

      For example, with this code enabled, on Windows we will pre-allocate 1.5 GB of shared memory (default setting for Constrained Shared memory, changeable via ConstrainedSHMSizeMB NOTES.INI setting) and with an addressable memory of 2 GB (default value for Windows to match default setting of OS, changeable via MEM_AddressableMemSizeMB NOTES.INI setting and OS configuration) that only leaves 512mb for local memory. The upside is that running out of memory either in shared or local will not crash the server (or should not), whereas the inability to map shared memory always will.

      This new code is off by default and must be enabled by setting MEM_EnablePreAlloc=1 in NOTES.INI.

      In order for this new code to work, we had to enable the sub-allocation of shared memory when pre-allocation is turned on (can be manually enabled if desired and do not wish to pre-allocate by setting MEM_EnableSubAlloc=1 in NOTES.INI; Sub-allocation is only on by default on AIX). With sub-allocation, we create shared memory as large "segments" and then sub-allocate our memory pools out of them. For example, on Windows the size for a "segment" is ~200MB (default setting for sub-allocate Shared Memory segment size, changeable via MEM_SHMSubAllocSize (in bytes) NOTES.INI setting) and we will then create our memory allocations out of it based on our shared dpool size of 4MB (default setting on Windows, changeable via SHARED_DPOOLSIZE (in bytes) NOTES.INI setting). This does limit the maximum single allocation size to the size of a "segment" - in this case ~200MB - but internally Domino makes no memory requests of this size, nor should any API program; an allocation request over this size will fail.

      There are also some changes/additions to our memory variables which are set in the NOTES.INI file:

      1. As stated previously, the variable "MEM_EnableSubAlloc=1" will enable sub-allocation of shared memory.

      2. As stated previously, the variable "MEM_SHMSubAllocSize=VALUE" can be used to override our default setting for the size of a sub-allocated "segment" of shared memory (where VALUE is in bytes, and the default varies by platform).

      3. As stated previously, the variable "MEM_EnablePreAlloc=1" will enable pre-allocation of shared memory and will also enable sub-allocation as well. (Setting this variable enables ConstrainedSHM and MEM_AddressableMem as well).

      4. The variable "ConstrainedSHM=1" will now enable the constraining of shared memory only - it will not directly inhibit "addressable" memory as before but will enable MEM_AddressableMem.

      5. The variable "ConstrainedSHMSizeMB=VALUE" can still be used to override our default setting for constrained shared memory (where VALUE is in megabytes, and the default varies by platform).

      6. The variable "MEM_AddressableMem=1" will enable code to limit the amount of memory we see as "addressable". Without this set there is still a default limit in place of 4GB and with the setting enabled more realistic values are used.

      7. The variable "MEM_AddressableMemSizeMB=VALUE" can be used to override our default setting for the amount of memory Domino will see as "addressable" memory (where VALUE is in megabytes, and the default varies by platform).

      8. There is now a variable on UNIX to enable using "mmap" for shared memory - "MEM_EnableMmap=1". This is on by default on Solaris only and is not presently supported on any other platform (minimal testing has been done on Linux x86).

      9. There is now a variable to specify the location for where Domino will place "mmap" shared memory files - "MEM_Mmap_Location=FOO" where FOO is the absolute path to the new location. This variable is only valid for platforms running with "mmap" shared memory.