For performance reasons, CentraSite uses an internal cache to store registry objects accessed via JAXR. In some cases, you might want to modify the cache configuration settings, in order to determine the optimal setup for your system. This section describes a command line tool that you can use for such purposes.
This command line tool allows you to display and to modify the JAXR-based configuration settings. The JAXR-based configuration settings apply to each connection.
The tool consists of an executable jar file CentraSiteCacheConfiguration.jar that is located in the bin folder of the CentraSite installation.
To be able to use the command line tool, please note the following points:
The user specified in the command line must have the "CentraSite Administrator" role.
The CentraSite Registry Repository must be online.
The tool requires a Java 6 runtime.
In order to display the cache configuration, run the tool with the DISPLAY keyword.
To display the cache settings for JAXR
java -jar CentraSiteCacheConfiguration.jar <CentraSite DB URL> <administrator user id> <password> DISPLAY
for example:
java -jar CentraSiteCacheConfiguration.jar "http://localhost:53307/CentraSite/CentraSite" DOMAIN\admin pAsSw0rD DISPLAY
The SET keyword is followed by pairs of option and value. After the modification operation is completed, the tool will display the modified cache configuration. The following options may be specified:
maxElementsOnHeap
maxElementsOffHeap
memoryStoreEvictionPolicy
statistics
If one of the options is not specified in the SET operation, its existing value will be copied.
The SET keyword is used as follows:
To modify the cache settings for JAXR
java -jar CentraSiteCacheConfiguration.jar <CentraSite DB URL> <administrator user id> <password> SET <option> <value> [<option> <value> ...]
for example:
java -jar CentraSiteCacheConfiguration.jar "http://localhost:53307/CentraSite/CentraSite" DOMAIN\admin pAsSw0rD SET maxElementsOnHeap 10000
The option maxElementsOnHeap
defines the
maximum number of elements in the cache. A value of 0 means no limit. Once the
cache is full, an element will be evicted according to the algorithm specified
by the memoryStoreEvictionPolicy
option.
Note:
The use of this option requires a special license key. For further
information contact your software supplier.
The option maxElementsOffHeap
defines the
amount of off-heap memory available to the cache. Off-heap memory is a separate
unit of memory available outside of the conventional JVM heap which can be used
for caching.
This option's values are given as
<number>k|K|m|M|g|G|t|T
, where the units can be kilobytes
(k|K), megabytes (m|M), gigabytes (g|G) or terabytes (t|T).
For example, maxMemoryOffHeap="2g"
allots 2 gigabytes to
off-heap memory. A value of 0 means no off-heap memory.
Before using off-heap memory, direct memory space, also called direct
(memory) buffers, must be allocated. In most popular JVMs, direct memory space
is allocated using the Java property
-XX:MaxDirectMemorySize
. This memory space, which
is part of the Java process heap, is separate from the object heap allocated by
-Xmx
. The value allocated by
-XX:MaxDirectMemorySize
must not exceed the
physical RAM, and is likely to be less than the total available RAM due to
other memory requirements. The value allocated to direct memory should be at
least 32MB more than the off-heap memory allocated to the caches.
The option memoryStoreEvictionPolicy
defines
the algorithm to be used in case an element needs to be evicted from the cache.
Possible values are:
LRU - least recently used
LFU - least frequently used
FIFO - first in first out
The option statistics
defines whether the cache
should capture statistical information, and if yes at which accuracy level. The
statistics comprise information like cache hits, cache misses and average time
to get an element. Possible values are:
OFF - no statistics
ACCURACY_NONE - fast but not accurate
ACCURACY_BEST_EFFORT - best effort accuracy
ACCURACY_GUARANTEED - guaranteed accuracy