WebSphere® eXtreme Scale supports sizing the memory consumption of BackingMap instances in distributed data grids. Memory consumption sizing is not supported for local data grid instances. The value that is reported by WebSphere eXtreme Scale for a given map is very close to the value that is reported by heap dump analysis. If map object is complex, the sizings might be less accurate. The CWOBJ4543 message is displayed in the log for any cache entry object that cannot be accurately sized because it is overly complex. You can get a more accurate measurement by avoiding unnecessary map complexity.
-javaagent:WXS lib directory/wxssizeagent.jar
For an embedded topology, add the argument to the command line of the WebSphere Application Server process.
For a distributed topology, add the argument to command line of the eXtreme Scale processes (containers) and the WebSphere Application Server process.
CWOBJ4541I: Enhanced BackingMap memory sizing is enabled.
If you must use internment, use one of the preceding techniques to get more accurate estimates.
When using custom types, prefer primitive data types for fields vs Object types.
Also, prefer the Object types listed in entry 2 over your own custom implementations.
When using custom types, keep the Object tree to one level. When inserting a custom Object into a map, WebSphere eXtreme Scale will only calculate the cost of the inserted Object, which includes any primitive fields, and all the Objects it directly references. WebSphere eXtreme Scale will not follow references further down into the Object tree. If you insert an Object into the map, and WebSphere eXtreme Scale detects references that were not followed during the sizing process, a message coded CWOBJ4543 that includes the name of the Class that could not be fully sized results. When this error occurs, treat the size statistics on the map as trend data, rather than relying on the size statistics as an accurate total.
Use the CopyMode.COPY_TO_BYTES copy mode to remove any uncertainty from sizing the value Objects being inserted into the map, even when an Object tree has too many levels to be sized normally (resulting in the CWOBJ4543 message).