-
1. Re: Performance degradation while creating large number of child nodes under a single parent
rhauch Jul 29, 2014 10:31 AM (in response to mohideen)1 of 1 people found this helpfulModeShape is a hierarchical database, so using a non-hierarchical structure is non-optimal and will quickly degrade performance. ModeShape works like this, but unfortunately, we've not been able to improve as much as we'd like the performance in these non-hierarchical cases. When your structure is not very hierarchical, quickly adding children under the same parent can create lots of conflicts because adding a child requires getting a write lock on the parent node. Secondly, the sizes of the parent node's persisted format (document) grow proportionally with the number of children, so reading and writing these nodes becomes expensive.
There is one thing you could try. The JSON configuration has a 'documentOptimization' section (under 'storage') that defines when ModeShape should run a background process that attempts to break up the persisted format of each node into multiple blocks based upon size. It is disabled by default, but you could try enabling it and playing with the frequency of the background process. Of course, this might not be that much benefit during performance testing and serially loading lots of nodes. See the JSON Schema for more information.
We do have an issue ([MODE-2109] Support nodes with a very large number of unordered and uniquely-named children) that we might get to before 4.0.0.Final, but it has pretty strict limitations. We'd be interested to know if those limitations are acceptable in your case.
-
2. Re: Performance degradation while creating large number of child nodes under a single parent
rhauch Jul 29, 2014 10:24 AM (in response to mohideen)BTW, forgive our tardiness on replying. The forums are acting up, and we're not getting notifications of new threads. We've filed a report, but the notifications come and go.
-
3. Re: Performance degradation while creating large number of child nodes under a single parent
rhauch Jul 29, 2014 11:28 AM (in response to rhauch)1 of 1 people found this helpfulI've logged [MODE-2271] Improve performance of getting path of node that is below a large ancestor - JBoss Issue Tracker as another improvement we can make.
-
4. Re: Performance degradation while creating large number of child nodes under a single parent
mohideen Jul 31, 2014 4:33 PM (in response to rhauch)I couldn't get the document optimizer to run even after adding the below configuration to the storage section:
"documentOptimization" : {
"threadPool" : "modeshape-opt",
"initialTime" : "15:50",
"intervalInHours" : 24,
"childCountTarget" : 5000,
"childCountTolerance" : 10000
}
Is something wrong with this config? or is there an alternative to trigger the optimization manually?