Memory exists in Adaptive Server as total logical or physical memory:
Total logical memory – is the sum of the memory required for all the sp_configure parameters. The total logical memory is required to be available, but may or may not be in use at a given moment. The total logical memory value may change due to changes in the configuration parameter values.
Total physical memory – is the sum of all shared memory segments in Adaptive Server. That is, total physical memory is the amount of memory Adaptive Server uses at a given moment. You can verify this value with the read-only configuration parameter total physical memory. The value of total physical memory can only increase because Adaptive Server does not shrink memory pools once they are allocated. You can decrease the amount of total physical memory by changing the configuration parameters and restarting Adaptive Server.
When Adaptive Server starts, it allocates memory for:
Memory used by Adaptive Server for nonconfigurable data structures
Memory for all user-configurable parameters, including the data cache, the procedure cache, and the default data cache.
Figure 18-1 illustrates how Adaptive Server allocates memory as you change some of the memory configuration parameters:
Figure 18-1: How Adaptive Server handles memory configuration changes
When a 2MB worker process pool is added to the Adaptive Server memory configuration, the procedure and data caches maintain their originally configured sizes; 1.6MB and 5.3MB, respectively. Because max memory is 5MB larger than the total logical memory size, it easily absorbs the added memory pool. If the new worker process pool brings the size of the server above the limit of max memory, any command you issue to increase the worker process pool fails. If this happens, the total logical memory required for the new configuration is indicated in the sp_configure failure message. Set the value of max memory to a value greater than the total logical memory required by the new configuration. Then retry your sp_configure request.
The size of the default data cache and the procedure cache has a significant impact on overall performance. See Chapter 15, “Memory Use and Performance,” in the Performance and Tuning Guide for recommendations on optimizing procedure cache size.