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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2013/09/25 15:40:04 UTC

[jira] [Commented] (OAK-1042) Segment node store caching

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

Thomas Mueller commented on OAK-1042:
-------------------------------------

It was relatively easy to use the LIRS cache. It did improve performance quite a bit for this test, I guess because no re-ordering is done when the cache entry is near the top of the stack:

{code}
java -Dwarmup=5 -Druntime=30 -Doak.file.cacheLIRS=false -jar target/oak-run-*.jar benchmark SQL2DescendantSearchTest Oak-Tar
Apache Jackrabbit Oak 0.10-SNAPSHOT
# SQL2DescendantSearchTest       min     10%     50%     90%     max       N
Oak-Tar                          231     233     235     242     280     127

java -Dwarmup=5 -Druntime=30 -Doak.file.cacheLIRS=true -jar target/oak-run-*.jar benchmark SQL2DescendantSearchTest Oak-Tar
Apache Jackrabbit Oak 0.10-SNAPSHOT
# SQL2DescendantSearchTest       min     10%     50%     90%     max       N
Oak-Tar                          158     159     160     165     228     185
{code}

                
> Segment node store caching
> --------------------------
>
>                 Key: OAK-1042
>                 URL: https://issues.apache.org/jira/browse/OAK-1042
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>
> Segment node stores caching seems to use quite a lot of CPU. According to my test, the oak-run SimpleSearchTest uses about 50% for Segment node store caching, when using the built-in profiler:
> {code}
> java -mx1g -Dwarmup=3 -Druntime=15 -jar target/oak-run-*.jar benchmark SimpleSearchTest Oak-Tar
> packages:
> 48%: com.google.common.cache <== cache
> 16%: org.apache.jackrabbit.oak.plugins.segment
> 8%: org.apache.jackrabbit.oak.plugins.memory
> 4%: org.apache.jackrabbit.oak.util
> 3%: org.apache.jackrabbit.oak.core
> 2%: org.apache.jackrabbit.oak.benchmark
> 2%: com.google.common.base   <== cache
> .
> Oak-Tar                          308     310     313     324     344      48
> {code}
> The problem seems to be the cache in the FileStore. As far as I see, the cache limit is 1000 <UUID, Segment> entries (size based, not weight based).
> I wonder if there is a simple way to reduce CPU usage. I will try with the LIRS cache.
> I also wonder if this cache should really be size limited, and not weight limited (segments can have different sizes as far as I know)?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira