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

Alex Parvulescu commented on OAK-1465:
--------------------------------------

I know this is silly, but I'm going to ask you to run the tests again as I 
can't reproduce the degradation on my machine [0]
I did see a quite a big difference between having an index and not having one, 
but no clear degradation as mentioned in this ticket.

One thing that happened is the test crashed with an OOME, but that may be just 
my 32b machine acting out :)
I found the errors interesting, maybe this is useful for the other guys:
 - this is what you see in the mongo console (sever side?)
{code}
Wed Mar  5 19:32:32 [conn125] ERROR:   mmap() failed for 
/home/alex/ci/oak/mongo/mongo-data/Oak-Mongo-1394044290140.2 len:67108864 
errno:12 Cannot allocate memory
Wed Mar  5 19:32:32 [conn125] ERROR: mmap failed with out of memory. You are 
using a 32-bit build and probably need to upgrade to 64
{code}

 - and this is what you see on the application (client side?), warning long 
stack traces ahead [1].


[0]
{code}
Apache Jackrabbit Oak 0.19-SNAPSHOT
# CreateManyIndexedNodesTest       C     min     10%     50%     90%     max    
   N
Oak-Mongo                          1     128     161     205     291    1732    
 258
Oak-Mongo                          1     124     168     211     268    1300    
 268
Oak-Mongo                          1     123     163     210     283    2307    
 246
Oak-Mongo                          1     110     164     209     285    1392    
 259
Oak-Mongo                          1     141     168     208     287     675    
 266
Oak-Mongo                          1     137     169     216     284     713    
 260
Oak-Mongo                          1     133     159     206     279    2790    
 245
Oak-Mongo                          1     118     166     208     287     684    
 265
Oak-Mongo                          1     135     166     212     278    1228    
 262
Oak-Mongo                          1     133     166     212     287     702    
 263
Oak-Mongo                          1     138     171     213     280    2161    
 248
{code}

[1]
{code}
Exception in thread "Background job 
org.apache.jackrabbit.oak.benchmark.CreateManyIndexedNodesTest$Writer@13ed2fc" 
java.lang.RuntimeException: javax.jcr.RepositoryException: OakMerge0001: 
OakMerge0001: Failed to merge changes to the underlying store (retries 4, 4719 
ms)
        at 
org.apache.jackrabbit.oak.benchmark.CreateManyIndexedNodesTest$Writer.run(CreateManyIndexedNodesTest.java:93)
        at 
org.apache.jackrabbit.oak.benchmark.AbstractTest$1.run(AbstractTest.java:430)
Caused by: javax.jcr.RepositoryException: OakMerge0001: OakMerge0001: Failed to 
merge changes to the underlying store (retries 4, 4719 ms)
        at 
org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:247)
        at 
org.apache.jackrabbit.oak.api.CommitFailedException.asRepositoryException(CommitFailedException.java:212)
        at 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.newRepositoryException(SessionDelegate.java:502)
        at 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:389)
        at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.perform(SessionImpl.java:414)
        at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl$8.perform(SessionImpl.java:411)
        at 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:157)
        at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl.perform(SessionImpl.java:124)
        at 
org.apache.jackrabbit.oak.jcr.session.SessionImpl.save(SessionImpl.java:411)
        at 
org.apache.jackrabbit.oak.benchmark.CreateManyIndexedNodesTest$Writer.run(CreateManyIndexedNodesTest.java:90)
        ... 1 more
Caused by: org.apache.jackrabbit.oak.api.CommitFailedException: OakMerge0001: 
OakMerge0001: Failed to merge changes to the underlying store (retries 4, 4719 
ms)
        at 
org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch.merge(AbstractNodeStoreBranch.java:304)
        at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.merge(DocumentNodeStoreBranch.java:143)
        at 
org.apache.jackrabbit.oak.plugins.document.DocumentRootBuilder.merge(DocumentRootBuilder.java:147)
        at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.merge(DocumentNodeStore.java:1187)
        at 
org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:242)
        at 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:245)
        at 
org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.save(SessionDelegate.java:387)
        ... 7 more
Caused by: org.apache.jackrabbit.mk.api.MicroKernelException: 
java.lang.NullPointerException
        at 
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.findAndModify(MongoDocumentStore.java:428)
        at 
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.createOrUpdate(MongoDocumentStore.java:440)
        at 
org.apache.jackrabbit.oak.plugins.document.Commit.rollback(Commit.java:397)
        at 
org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:345)
        at 
org.apache.jackrabbit.oak.plugins.document.Commit.applyToDocumentStore(Commit.java:203)
        at 
org.apache.jackrabbit.oak.plugins.document.Commit.applyInternal(Commit.java:188)
        at 
org.apache.jackrabbit.oak.plugins.document.Commit.apply(Commit.java:177)
        at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:172)
        at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:85)
        at 
org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:36)
        at 
org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch$InMemory.merge(AbstractNodeStoreBranch.java:487)
        at 
org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch.merge(AbstractNodeStoreBranch.java:288)
        ... 13 more
Caused by: java.lang.NullPointerException
        at 
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192)
        at 
org.apache.jackrabbit.oak.plugins.document.util.StringValue.<init>(StringValue.java:35)
        at 
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.addToCache(MongoDocumentStore.java:753)
        at 
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.applyToCache(MongoDocumentStore.java:708)
        at 
org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.findAndModify(MongoDocumentStore.java:422)
        ... 24 more
{code}



> performance degradation with growing index size on Oak-Mongo
> ------------------------------------------------------------
>
>                 Key: OAK-1465
>                 URL: https://issues.apache.org/jira/browse/OAK-1465
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>    Affects Versions: 0.17.1
>            Reporter: Stefan Egli
>            Assignee: Alex Parvulescu
>             Fix For: 0.19
>
>         Attachments: CreateManyIndexedNodesTest.java
>
>
> Tested with an oak-snapshot of Monday Feb 24, 10AM EST.
> Noticed that when the amount of nodes indexed - eg wrt a particular property 
> - the adding of nodes becomes slower and slower.
> Will attach a oak-run benchmark to underline this. Basically the scenario 
> where this occurred was:
>  * have a number of "level 1" nodes (eg 100)
>  * under those "level 1" nodes, add a growing list of children, each with a 
> property that is indexed (ie that index is actually growing and is probably 
> causing the slowdown).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to