After you create a data cache, you can divide it into memory pools, each of which may have a different I/O size.
In any cache, you can have only one pool of each I/O size. The total size of the pools in any cache cannot be greater than the size of the cache. The minimum size of a memory pool is the size of the server’s logical page. Memory pools larger than this must be a power of two and can be a maximum size of one extent.
When SAP ASE performs large I/Os, multiple pages ar simultaneously read into the cache. These pages are always treated as a unit; they age in the cache and are written to disk as a unit.
By default, when you create a named data cache, all of its space is assigned to the default memory pool. Creating additional pools reassigns some of that space to other pools, reducing the size of the default memory pool. For example, if you create a data cache with 50MB of space, all the space is assigned to the 2K pool. If you configure a 4K pool with 30MB of space in this cache, the 2K pool is reduced to 20MB.
After you create the pools, you can move space between them. For example, in a cache with a 20MB 2K pool and a 30MB 4K pool, you can configure a 16K pool, taking 10MB of space from the 4K pool.
The commands that move space between pools within a cache do not require you to restart SAP ASE, so you can reconfigure pools to meet changing application loads with little impact on server activity.
In addition to creating pools in the caches you configure, you can add memory pools for I/Os up to 16K to the default data cache.
sp_poolconfig cache_name, "memsize[P|K|M|G]", "config_poolK" [, "affected_poolK"]
The config_pool is set to the size specified in the command. The space is moved into or out of a second pool, the affected_pool. If you do not specify an affected_pool, the space is taken from or allocated to the 2K pool (the smallest size available). The minimum size for a pool is 512K.
sp_poolconfig pubs_cache, "7M", "16K"
sp_cacheconfig pubs_cache
Cache Name Status Type Config Value Run Value ------------------------ --------- -------- ------------ ------------ pubs_cache Active Mixed 10.00 Mb 10.00 Mb ------------ ------------ Total 10.00 Mb 10.00 Mb ======================================================================= Cache: pubs_cache, Status: Active, Type: Mixed Config Size: 10.00 Mb, Run Size: 10.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 -------- --------- ------------ ------------ ----------- 2 Kb 2048 Kb 0.00 Mb 3.00 Mb 10 16 Kb 1424 Kb 7.00 Mb 7.00 Mb 10
You can also create memory pools in the default data cache.
Cache Name Status Type Config Value Run Value ------------------------ --------- -------- ------------ ------------ default data cache Active Default 25.00 Mb 42.29 Mb ------------ ------------ Total 25.00 Mb 42.29 Mb ======================================================================= Cache: default data cache, Status: Active, Type: Default Config Size: 25.00 Mb, Run Size: 42.29 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 -------- --------- ------------ ------------ ----------- 2 Kb 8662 Kb 0.00 Mb 42.29 Mb 10
sp_poolconfig "default data cache", "8M", "16K"
Cache Name Status Type Config Value Run Value ------------------------ --------- -------- ------------ ------------ default data cache Active Default 25.00 Mb 42.29 Mb ------------ ------------ Total 25.00 Mb 42.29 Mb ======================================================================= Cache: default data cache, Status: Active, Type: Default Config Size: 25.00 Mb, Run Size: 42.29 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 -------- --------- ------------ ------------ ----------- 2 Kb 8662 Kb 0.00 Mb 34.29 Mb 10 16 Kb 1632 Kb 8.00 Mb 8.00 Mb 10
You need not configure the size of the 2K memory pool in caches that you create. Its Run Size represents all memory that is not explicitly configured to other pools in the cache.