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

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

I updated both branches from above with an approach where evicting a random 
element from the cache doesn't suffer the performance penalty seen so far:

* https://github.com/mduerig/jackrabbit-oak/tree/OAK-4635-1: evict single 
element on deepest level instead of entire level
* https://github.com/mduerig/jackrabbit-oak/tree/OAK-4635-2: cache nodes by 
weight instead of depth

> 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.10
>
>
> {{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)

Reply via email to