Controlling the size of the cache

The gateway uses a cache to store details of tables that require transferring from one ObjectServer to another. Change the size of the cache if the ObjectServer to which the gateway is linked handles large numbers of events.

The main function of the cache is to facilitate journal and details table insert operations. When a journal or detail is forwarded for insertion into a target ObjectServer, the gateway writer needs to know the corresponding status serial in the target ObjectServer. This information is found in the cache. The cache is also used for any other tables that are specified in the table replication definition table.

The cache increases performance by providing the gateway with an in-memory summarized view of the contents of the ObjectServers to which it is linked. As a result, the gateway does not have to query an ObjectServer to check for the existence of an event, or the Serial or Tally of an event. Instead, it can check the cache of the ObjectServer.

Procedure

The cache is implemented by a hash table. Performance decreases if the number of rows in the ObjectServer status table is many times the number of entries in the hash table.

To control the size of the hash table cache, change the value of the Gate.CacheHashTblSize property.
The default is 5023 elements, or rows. If a status table has many rows, for example, over 20,000, increase the number. For efficiency, specify a value that is a prime number.

What to do next

After you edited the properties file, restart the gateway.