Chapter 2: Managing In-Memory and Relaxed-Durability Databases


Specifying named caches for in-memory databases

Sybase recommends that you use huge pages for in-memory storage cache. See the Configuration Guide for your platform.

Caches that hold in-memory databases must be large enough to contain the entire database. A cache that contains an in-memory database is called in-memory storage, and disables:

Once created, divide the in-memory storage cache into one or more pieces, each of which holds a fragment of the database or log. See “Cache and buffer support”.

Use sp_cacheconfig with the inmemory_storage parameter to create the in-memory storage cache. See the Reference Manual: Procedures.

NoteBefore you create the in-memory storage cache, verify that the value for max memory is sufficient for the specified cache size. If max memory is insufficient, Adaptive Server issues an error message.

For example, to create an in-memory storage cache named imdb_cache, enter:

sp_cacheconfig imdb_cache, '2G', inmemory_storage

NoteFor regular named cache, if the available memory size is less than the requested memory size for the cache, Adaptive Server creates the cache with the reduced memory size. That means the cache is created sucessfully, but with a smaller size. However, if there is insufficient space to create the cache for an in-memory database, the command fails.