Shared caching
- To disable shared caching, use the -D command-line option.
- When shared caching is enabled, qdb reserves exclusive privileges for writing to the database. To allow other applications to use the database files, use the -A option.
# qdb -v -D -otempstore=/dev/shmem -Rset
qdb: Exclusive locking mode requires that shared cache
be enabled
Advantages of shared caching
Shared caching improves performance times and reduces the total amount of memory required for database connections by having multiple connections share the same memory cache.
For example, without shared caching, if 1 MB of memory is required for each database connection, 40 connections require 40 MB of memory. With shared caching, these 40 connections could share a common memory cache of, say, 25 MB (or another size determined by your environment and performance requirements). Furthermore, there is no duplication in memory, so you may be able to hold all or most of the database, greatly reducing the need for disk I/O.
