Memory is the most important consideration when you are configuring Adaptive Server. Memory is consumed by various configuration parameters, thread pools, procedure caches, and data caches. Correctly setting the values of the configuration parameters and the caches is critical to good system performance.
The total memory allocated during start up is the sum of the memory required for all Adaptive Server configuration requirements. This value is accumulated by Adaptive Server from the read-only configuration parameter total logical memory. The configuration parameter max memory must be greater than or equal to total logical memory. max memory indicates the amount of memory you allow for Adaptive Server needs.
Adaptive Server allocates memory based on the value of total logical memory at start up. However, if you have set the configuration parameter allocate max shared memory, the amount of memory Adaptive Server allocates is based on the value of max memory. This allows a system administrator to tell Adaptive Server to allocate, at start up, the maximum allowed, which may be considerably more than the value of total logical memory at that time.
The key points for memory configuration are:
The system administrator should determine the size of shared memory available to Adaptive Server and set max memory to this value.
Set the value for the allocate max shared memory at startup configuration parameter to the fewest number of shared memory segments. This may improve performance, because operating with a large number of shared memory segments may cause performance degradation on certain platforms. See your operating system documentation to determine the optimal number of shared memory segments. Once a shared memory segment is allocated, it cannot be released until the next time you start Adaptive Server.
The amount of memory available for a new thread pool is determined by the amount of free memory available from max memory. If Adaptive Server has insufficient memory to create the thread pool, it displays an error message indicating the amount you must raise max memory before creating the thread pool. In this example
If the defaults are insufficient, reconfigure the configuration parameters.
The difference between max memory and total logical memory is additional memory available for procedure, for data caches, thread pools, or for other configuration parameters.
The amount of memory to be allocated by Adaptive Server during boot-time is determined by either total logical memory or max memory. If this value is too high:
Adaptive Server may not start if the physical resources on your machine are insufficient.
If Adaptive Server starts, the operating system page fault rates may rise significantly and you may need to reconfigure the operating system to compensate.
What remains after all other memory needs have been met is available for the procedure cache and the data cache. Figure 5-1 shows how memory is divided.