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

Marcel Reutegger commented on OAK-9780:
---------------------------------------

I ran a slightly modified CacheWarmingTest with different configurations. The 
test now also logs how long it took to read the nodes.

The first run targets a local MongoDB.
{noformat}
=== doSimple( cleanCaches = true, prefetch = true )
after init       -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
before merge     -> createOrUpdateCalls = 3, findCalls = 7, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
after merge      -> createOrUpdateCalls = 22, findCalls = 5127, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 699
after invalidate -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 0
after prefetch   -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
read time        -> 235,6 ms
end              -> createOrUpdateCalls = 1, findCalls = 20483, queryCalls = 7, 
removalCalls = 0, rawFindCalls = 8
=== doSimple( cleanCaches = false, prefetch = false )
after init       -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
before merge     -> createOrUpdateCalls = 3, findCalls = 7, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
after merge      -> createOrUpdateCalls = 22, findCalls = 5127, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 699
read time        -> 187,9 ms
end              -> createOrUpdateCalls = 0, findCalls = 15360, queryCalls = 7, 
removalCalls = 0, rawFindCalls = 7
=== doSimple( cleanCaches = true, prefetch = false )
after init       -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
before merge     -> createOrUpdateCalls = 3, findCalls = 7, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
after merge      -> createOrUpdateCalls = 22, findCalls = 5127, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 699
after invalidate -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 0
read time        -> 3,161 s
end              -> createOrUpdateCalls = 1, findCalls = 20487, queryCalls = 7, 
removalCalls = 0, rawFindCalls = 15370

{noformat}

The next run targets the same local MongoDB but goes through a toxiproxy with 
2ms latency.
{noformat}
=== doSimple( cleanCaches = true, prefetch = true )
after init       -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
before merge     -> createOrUpdateCalls = 3, findCalls = 7, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
after merge      -> createOrUpdateCalls = 22, findCalls = 5135, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 703
after invalidate -> createOrUpdateCalls = 0, findCalls = 1, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 0
after prefetch   -> createOrUpdateCalls = 1, findCalls = 2, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 2
read time        -> 319,7 ms
end              -> createOrUpdateCalls = 0, findCalls = 20480, queryCalls = 7, 
removalCalls = 0, rawFindCalls = 7
=== doSimple( cleanCaches = false, prefetch = false )
after init       -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
before merge     -> createOrUpdateCalls = 3, findCalls = 7, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
after merge      -> createOrUpdateCalls = 22, findCalls = 5133, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 702
read time        -> 243,3 ms
end              -> createOrUpdateCalls = 1, findCalls = 15363, queryCalls = 7, 
removalCalls = 0, rawFindCalls = 7
=== doSimple( cleanCaches = true, prefetch = false )
after init       -> createOrUpdateCalls = 0, findCalls = 0, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
before merge     -> createOrUpdateCalls = 3, findCalls = 7, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
after merge      -> createOrUpdateCalls = 22, findCalls = 5135, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 702
after invalidate -> createOrUpdateCalls = 0, findCalls = 1, queryCalls = 0, 
removalCalls = 0, rawFindCalls = 1
read time        -> 44,76 s
end              -> createOrUpdateCalls = 1, findCalls = 20568, queryCalls = 7, 
removalCalls = 0, rawFindCalls = 15410
{noformat}

> PoC for DocumentNodeStore cache warming
> ---------------------------------------
>
>                 Key: OAK-9780
>                 URL: https://issues.apache.org/jira/browse/OAK-9780
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: documentmk
>            Reporter: Stefan Egli
>            Assignee: Stefan Egli
>            Priority: Major
>
> Proof of concept of cache warming for DocumentNodeStore. Goal is for indexing 
> to warm up the cache for a select few eg paths to allow for faster 
> iterating/reading of the same eg paths later on



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to