Performance tuning | Tune in-memory cache size
Control DRS message size
Cache replication distributes cache entries and invalidations in the form of DRS messages.In the past when we had no ability to control DRS message size, depending on the size of your cache, the DRS messages generated can be very large, often times hundreds of KB or several MB in some extreme cases. A busy WebSphere Commerce JVM is usually fragmented. Finding this much contiguous space in a fragmented JVM is often impossible, and when this happens, an Out Of Memory condition is triggered and causes the JVM to crash.
A solution is now available to address this problem.
With two new APARs or WebSphere Application Server fix pack 6.0.2.19 or later, you can now control the DRS message size and replicate smaller DRS objects and in batches.
The two APARs are:
- PK32201: OutOfMemory DUE TO LARGE DRS MESSAGES
- PK35824: Extending PK32201 to batching of Invalidation events
These fixes appear to only be relevant if you are using PUSH for replication mode.
The batch size of the replication data can now be configured using the following custom properties:
- com.ibm.ws.cache.CacheConfig.cachePercentageWindow
Limit on the number of cache entries sent by the Data Replication Service in terms of the percentage of total cache in memory.
- Default value: 2% of the number of entries in the cache
- Scope: configurable per-cache instance
- com.ibm.ws.cache.CacheConfig.cacheEntryWindow
Limit on the total number of cache entries sent by the Data Replication Service in terms of number of entries.
- Default value: 50 entries
- Scope: configurable per cache instance
- com.ibm.ws.CacheConfig.batchUpdateMilliseconds
Batch update frequency in terms of milliseconds. Setting this property will result in Dynacache processing updates more frequently, and thus reducing the payload size. The default value is 1000 ms (1 s).