Adjusting the Named rapTAQcache Data Cache Size in the RAPCache

Adjust the size of the named rapTAQcache data cache to use as much memory as is available on the system running Adaptive Server Enterprise.

Note: If your transfer and truncation user data tables reside on a separate database, use a dedicated cache instead of the default cache. This avoids incorrect cache percentage full numbers due to system process sharing of the default cache.

Adjusting the named rapTAQcache data cache size increases RAPCache performance as an in-memory database. The amount of shared memory available to Adaptive Server determines the values of these configuration variables:


The value for max memory should be the maximum amount of shared memory available on your system. The amount of shared memory available is generally controlled by the operating system configuration, but is likely to require modification before you can properly configure a usable RAPCache.

The amount of memory to reserve for shared memory is dependent on total memory available on your system. The maximum amount of memory should be allocated for shared memory, but enough memory should be retained for use by the various processes that will be running on the system. For example, if a system is dedicated to the RAPCache and RAPCache subscriber, and has a total of 32GB of memory (RAM), then you should configure approximately 28-30 GB of operating system shared memory.

  1. Configure operating system shared memory.
  2. Configure the RAPCache to use the memory.
    1. Configure max memory to the total amount of shared memory available on your system
    2. Configure the default data cache.

      The data cache size is dependent on the max memory configuration value. Use as much memory as can be spared, given the system on which Adaptive Server is running. If max memory is 16GB, allocate 15GB for data cache; the rest is to be used for the procedure, RAPCache system memory usage and so on.

  3. When configuring the named rapTAQcache data cache size, also partition the cache, so that access to the cache from multiple engines does not cause contention.

    The partition count should be roughly equivalent to the number of engines, but you must specify the value in powers of two.

    For example, if you have configured 6 engines, then the cache partition count should be set to 8.

Example of rapTAQcache configuration script

This SQL script configures max memory to 16GB, and default data cache with 15GB of memory, and 8 cache partitions:
sp_configure 'max memory', 8000000 
go
sp_cacheconfig 'default data cache', '15G', 'cache_partition=8'
go