So you're opening a GraphDatabaseService, using a GraphDatabaseFactory for 
doing the queries, right?

Keep in mind that initial runs where nodes and relationships a read into 
memory takes additional time, so what happens if you run the same query 
twice?

Also the memory mapping settings has the pattern:

    neostore.<store>.mapped_memory

so in your setup you should have:

neostore.nodestore.db.mapped_memory=100M
neostore.relationshipstore.db.mapped_memory=3G
neostore.propertystore.db.mapped_memory=100M
neostore.propertystore.db.strings.mapped_memory=200M
neostore.propertystore.db.arrays.mapped_memory=50M

And an index wouldn't help since no indexes are used during in the dijkstra 
algo.

Den tisdagen den 13:e maj 2014 kl. 17:56:07 UTC+2 skrev Antonio Grimaldi:
>
> Hi,
>
> i'm using neo4j 2.0.3 with embedded DB,in order to build a route system.
>
> I created my graph (with around 1 Million of Nodes, and 50 Million of 
> relationships; ) in this way:
>
>    - 
>    
>    create nodes : 
>    
> Label mainNodeLabel = DynamicLabel.label("nodoPrincipale");
> // initialize batchInserter
> BatchInserter inserter = BatchInserters.inserter(neo4jDbPath, config);
> BatchInserterIndexProvider indexProvider = new 
> LuceneBatchInserterIndexProvider(inserter);
> inserter.createDeferredSchemaIndex(mainNodeLabel).on("y").create();
> inserter.createDeferredSchemaIndex(mainNodeLabel).on("x").create();
> BatchInserterIndex osmWayIdPropertyIndex = 
> indexProvider.relationshipIndex("osmWayIdProperties", 
> MapUtil.stringMap("type", "exact"));
> osmWayIdPropertyIndex.setCacheCapacity(OSMAttribute.OSM_WAY_ID_PROPERTY, 
> 100000);
>
>  
>
> Map<String, Object> nodeProps = new HashMap<String, Object>();
> double x = ...;
> double y = ...;
> nodeProps.put("y", y);
> nodeProps.put("x", x);
>
> long graphNodeId = inserter.createNode(nodeProps, mainNodeLabel); 
>   
>
>
>
>    - 
>    
>    create relationships between created nodes :
>    
> Map<String, Object> relationProps = new HashMap<String, Object>();
> relationProps.put(OSMAttribute.EDGE_LENGTH_PROPERTY, lunghezzaArco);
> long relId = inserter.createRelationship(startNode, endNode, 
> "CAR_MAIN_NODES_RELATION", relationProps);
>
> osmWayIdPropertyIndex.add(relId, relationProps)
>
>
>    - Neo4j Configuration : 
>
> nodestore_mapped_memory_size=100M
> relationshipstore_mapped_memory_size=3G
> nodestore_propertystore_mapped_memory_size=100M
> strings_mapped_memory_size=200M
> arrays_mapped_memory_size=50M
>
> When I Calculate shortest path between startNode and endNode with Dijkstra: 
> PathFinder<WeightedPath> finder = 
> GraphAlgoFactory.dijkstra(PathExpanders.forTypeAndDirection(relationType, 
> Direction.OUTGOING), "edgeLength");
> WeightedPath path = finder.findSinglePath(startNode, endNode);
>
> I have very slow performance... about 68194 millis for a distance of 42km.
> Is there something wrong? 
> Maybe i should index relationship cost property too? (edgeLength)
>
> Thanks
> Antonio
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to