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

Timothee Maret commented on OAK-2968:
-------------------------------------

I agree improving the memory consumption of the ModifiedNodeState is not going 
to avoid OOME for arbitrary large commits. Yet, I believe reducing heap 
consumption is still a worthy improvement.

> Reduce commits memory footprint of ModifiedNodeState
> ----------------------------------------------------
>
>                 Key: OAK-2968
>                 URL: https://issues.apache.org/jira/browse/OAK-2968
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.2.2
>            Reporter: Timothee Maret
>              Labels: perfomance
>
> As described in [0] large commits consume a fair amount of memory. With very 
> large commits, this become problematic as commits may eat up 100GB or more 
> and thus causing OOME and aborting the commit.
> The current representation of commits in memory uses a tree which each node 
> contains HashMaps for the changed properties as well as sub-nodes.
> In cases where the tree is deep but not sparse, most of the children HashMaps 
> will contain 1 element yet they are created with the default capacity (16) 
> thus wasting space.
> This issue covers a simple way to reduce the memory consumption in this case 
> by simply creating HashMaps of the required capacity (where applicable) or of 
> minimal capacity (1) where unknown.
> [0] http://permalink.gmane.org/gmane.comp.apache.jackrabbit.oak.devel/8196



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to