Cache Configuration
The CacheConfig.xml file includes the cache configuration. The file is available in the $MQ_HOME/config folder.
The following table describes the Cache attributes listed in the CacheConfig.xml file:
Cache Attributes | Descriptions |
---|---|
Server Config | |
CacheServerCount | Defines the number of configured cache servers. However, this number is only for the information purpose. |
CharSet | Defines the objectsize configuration to be used. The available charsets are singlebyte and multibyte. If the language that is used in the application contains multi byte characters, specify the multibyte value. For example, multi byte characters are used in French, Japanese, Korean, and so on. |
Memory | Defines the total memory assigned to the cache servers. This includes the heap storage. The memory allocated for all near and distributed caches is (Memory - HeapStorage). Memory must be more than heap size. A warning is issued if memory is specified less than 64m or Memory - Heapstorage is less than 64m. By default, memory is set to 512m. The memory required by external cache servers relies on configuration specified in the CacheConfig.xml file. If the memory is 2048 KB and the heapsize is 512 KB, the memory used by each cache server is as follows: (Memory - HeapStorage) 2048 - 512= 1536 KB. To allocate more memory, you must start more cache servers. You can preload entire repositories into memory at start up. This takes a while to start. However, after the memory is loaded, it provides significant performance gains. Do not use multivalue attributes that are not stored in the shared tables because preloading such large data takes significantly longer. |
HeapStorage | Defines the memory allocated for near and local caches. Min heap must be minimum 32m, by default, it is 128m. A warning is issued if heap is specified more than 512m. |
OverHead | Defines the additional overhead added to objectsize. By default, the overhead factor is 1.5. |
ReplicationCount | Allows you to keep the data multiple times (typically, duplicating it) so that no single server failure can lead to data loss. The value are 0 and 1. By default, it is set to 0.
|
CacheList | |
Name | Defines the name of the cache server. For example, RECORD. It allows you to keep a track of the cache configurations. |
Description | Defines the description of the cache. For example, The description for RECORD is 3-4 entries per record. |
Type | Defines the type of cache servers. The available cache server types are local, distributed, and near. Specify limit or list size for near caches to avoid mismatch between capacity in heap and in distributed storage. For distributed caches, if no limit or list size is specified, remaining memory is distributed evenly after memory is assigned to all other caches. The remaining memory must be minimum 32. |
ReplicationCount | Allows you to keep the data multiple times (typically, duplicating it) so that no single server failure can lead to data loss. The value are 0 and 1. By default, it is set to 0.
|
SingleByteObjectSize | Defines the single byte objectsize for the cache server. |
MultiByteObjectSize | Defines the multi byte objectsize for the cache server. |
Limit | Defines the limit in which the memory is divided among all cache types, such as, Local, Distributed, and Near. |
ListSize | Defines the list size of the cache. Use the ListSize to specify the exact capacity. Similarly, specify the Limit if you want the cache to get memory as it grows. |
EvictionPolicy | Defines eviction policy for a cache. The eviction polices are Least Recently Used (LRU) and None. By default, the eviction policy is set at LRU.
|
LockWaitTime | Defines the value while waiting for the lock to clear. An application can lock an entry so that the entry cannot be modified (but can still be read) until the lock is explicitly removed. By default, it is set to -1, which means the lock never waits. |
LockExpirationTime | This property defines the value while lock for an entry expires. By default, it is set to -1, which means the lock never expires. |