You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2016/01/25 14:34:39 UTC
[jira] [Resolved] (OAK-3889) SegmentMk StringCache memory leak
[ https://issues.apache.org/jira/browse/OAK-3889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Parvulescu resolved OAK-3889.
----------------------------------
Resolution: Fixed
Assignee: Alex Parvulescu
Fix Version/s: 1.3.15
fixed according to feedback
* split the current key into 2, one for each cache
* adjusted the overhead to be more realistic with the cache impl
* introduced {{oak.segment.stringCache}} system property to control the cache size (a value of -1, or negative will properly disable the cache). if this is not set the previous behavior is used (same cache value as the segment cache).
> SegmentMk StringCache memory leak
> ---------------------------------
>
> Key: OAK-3889
> URL: https://issues.apache.org/jira/browse/OAK-3889
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segmentmk
> Reporter: Alex Parvulescu
> Assignee: Alex Parvulescu
> Fix For: 1.3.15
>
> Attachments: CacheLIRS-Entry-heap.png, OAK-3889-v2.patch, StringCache.java.patch
>
>
> The StringCache is made of 2 components: a FastCache and a Lirs Cache and both caches use the same key object 'StringCacheEntry' with the condition that the FastCache contains the string value itself with the key while the Lirs Cache will only contain the _msb_, _lsb_ and _offset_.
> Sharing the same key leads to issues when a value qualifies for both caches as it results in the string value ending up contained in the Lirs Cache, effectively blowing up the cache's size. [0]
> On a test I ran I noticed the Lirs Cache going up to 800mb even though it was configured at 256mb.
> [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/StringCache.java#L86
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)