Adding memory to an existing named cache

The syntax to add memory to an existing cache is:

sp_cacheconfig cache_name, "new_size[P|K|M|G]”

The syntax is described in “Creating a new cache”.

The additional memory you allocate is added to Adaptive Server’s page size pool. For example, in a server with a logical page size of 4K, the smallest size for a pool is a 4K buffer pool. If the cache has partitions, the additional memory is divided equally among them.

If there is insufficient memory available, Adaptive Server allocates what it can and then allocates the full amount at the next reboot. See “Insufficient space for new cache” for more information.

The following adds 2MB to a cache named pub_cache:

sp_cacheconfig pub_cache, “12M”

sp_cacheconfig displays the following after the memory is added:

sp_cacheconfig pub_cache
 Cache Name                     Status    Type     Config Value Run Value
------------------------------ --------- -------- ------------ ------------
pub_cache                      Active    Mixed      12.00 Mb       12.00 
------------ ------------
Total      12.00 Mb     12.00 Mb
==========================================================================
Cache: pub_cache,   Status: Active,   Type: Mixed
Config Size: 12.00 Mb,   Run Size: 12.00 Mb
Config Replacement: strict LRU,   Run Replacement: strict LRU
Config Partition:            1,   Run Partition:            1

IO Size  Wash Size Config Size  Run Size     APF Percent
-------- --------- ------------ ------------ -----------
4 Kb   2456 Kb      0.00 Mb     12.00 Mb     10 

This change adds memory to the database page-size buffer pool and recalculates the wash size, as required. If the absolute value is set for wash size, Adaptive Server does not recalculate it.