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 "Michael Dürig (JIRA)" <ji...@apache.org> on 2017/04/20 09:14:04 UTC

[jira] [Commented] (OAK-6106) Excessive memory usage by the cached segment references

    [ https://issues.apache.org/jira/browse/OAK-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976348#comment-15976348 ] 

Michael Dürig commented on OAK-6106:
------------------------------------

Test case at http://svn.apache.org/viewvc?rev=1792030&view=rev. 

The test tries to add 2M child nodes to a parent node. Heap usage keeps steadily growing until it goes OOM (-Xmx512m). 

> Excessive memory usage by the cached segment references
> -------------------------------------------------------
>
>                 Key: OAK-6106
>                 URL: https://issues.apache.org/jira/browse/OAK-6106
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>              Labels: perfomance
>             Fix For: 1.7.0, 1.8
>
>
> The references of a segment to other segments are cached within {{Segment.readReferencedSegments()}}. However caching the {{SegmentId}} instances themselves leads to excessive heap usage as each id also keeps a reference to its underlying segment. 
> I suggest to cache those references as msb, lsb pairs instead and create the {{SegmentId}} instance on the fly when required. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)