A heap dump from a Jackrabbit 2.2 based system recently showed that the ConcurrentCache of the bundle persistence managers used a lot more memory than configured. One of them used 10 times the configured bundle size.
It turned out that the majority of the cache entries referenced AbstractBundlePersistenceManager.MISSING. The size estimate of 16 bytes is too low and does not account for the overhead that comes with the internal LinkedHashMap of the ConcurrentCache.
I think a more sensible value is 128 bytes, which is the sum of:
- 32 bytes for ConcurrentCache.E
- 64 bytes for LinkedHashMap.Entry
- 32 bytes for NodeId
The unified cache, which also includes missing NodePropBundle entries was introduced with