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 2016/09/07 15:35:20 UTC

[jira] [Commented] (OAK-4635) Improve cache eviction policy of the node deduplication cache

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

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

Further cache variants:
* https://github.com/mduerig/jackrabbit-oak/tree/OAK-4635-3 : new priority cache implementation 
* https://github.com/mduerig/jackrabbit-oak/tree/OAK-4635-4 : base (with a fix for collecting statistics)
* https://github.com/mduerig/jackrabbit-oak/tree/OAK-4635-5 : old level based cache with nodeDeduplicationCache.size=20M (hard coded). 
* https://github.com/mduerig/jackrabbit-oak/tree/OAK-4635-6. Similar to OAK-4635-3 as it also uses the priority cache. However it uses the number of child nodes of a node as cost instead of the depth in the tree. I expect this to improve the cache hit ratio for the cases where there are nodes with a lot of direct children. Through [~frm] 's improvement in OAK-4570 the hit ratio should even improve in the case where a node with many child node is modified as in this case the modified node will be stored as diff between the (cached!) base state the edited state. 



> Improve cache eviction policy of the node deduplication cache
> -------------------------------------------------------------
>
>                 Key: OAK-4635
>                 URL: https://issues.apache.org/jira/browse/OAK-4635
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>              Labels: perfomance
>             Fix For: Segment Tar 0.0.12
>
>
> {{NodeCache}} uses one stripe per depth (of the nodes in the tree). Once its overall capacity (default 1000000 nodes) is exceeded, it clears all nodes from the stripe with the greatest depth. This can be problematic when the stripe with the greatest depth contains most of the nodes as clearing it would result in an almost empty cache. 



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