Hi,
To use the Dijkstra algorithm to find all the paths between two nodes
is a bit overkill. You should instead use the AllSimplePaths class
which is optimized to find all the paths between two nodes
(irregardless of weight).
If you instead feel like updating to the latest neo4j kernel
(1.1-SNAPSHOT) and graph-algo package (0.6-SNAPSHOT) the
AllSimplePaths has been reimplemented using the new traversal
framework and has a better interface, including a Path abstraction.
Although I'm uncertain about the performance difference between the
0.3 version and the 0.6-SNAPSHOT version.
2010/5/21 Maaz Bin Tariq maaz.ta...@yahoo.com:
Hello Everyone,
I have been using neo4j for couple of months, but recently it is giving me
performance issues while getting all path between two nodes. I have tried
all the configuration for performance improvement but was unsuccessful. The
number of Nodes is about 35k 1 property per node and number of relationship
is about 100K. we are using Index on each node. The system load reached up to
8 to 9 during peak time. I have run JProfiler and below code seem to be the
problem and taking much cpu util. Please let me know if i am doing something
silly. We access this method continuously during heavy load and that can be
every second.
-
DijkstraInteger dijkstra = new DijkstraInteger(0, start, end, new
CostEvaluatorInteger() {
public Integer getCost(Relationship relationship, boolean
backwards) {
// unweighted graph
return 1;
}
}, new IntegerAdder(), new IntegerComparator(), Direction.BOTH,
SocialNetworkRelationshipType.KNOWS);
dijkstra.limitMaxCostToTraverse(3);
dijkstra.getPathsAsNodes();
-
Currently the system configuration was RAM 2 GB , 1 GB is allocated to JVM
heap and 512 MB to memory mapping. JVM running with VM arrguments-server and
-XX:+UseConcMarkSweepGC.
Following are the neo4j jars we are using
neo4j-graph-algo-0.3.jar
neo4j-index-1.0.jar
neo4j-kernel-1.0.jar
neo4j-shell-1.0.jar
neo4j-commons-1.0.jar
lucene-core-2.9.1.jar
After moving the neo4j to a new instance of 16 GB RAM , 5 GB allocated to JVM
heap and 2.5 GB to memory mapping still give a system load up to 3.
Kindly suggest whats can be done to optimize neo4j ?
Thanks
-Maaz Tariq
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
--
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user