cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Pagerank Cypher execution time fluctuates massive

Hi,

I am executing the following Cypher after creation of the called subgraph in a loop.
Neo4j 4.2.3 embedded + GDS 1.5.1 running in Eclipse 4.16.

CALL gds.pageRank.stream('" + graphName + "', " + 
				"{ " + relWeightProp + " maxIterations: 100, dampingFactor: 0.85 }) " +
				"YIELD nodeId, score " + "RETURN gds.util.asNode(nodeId).name AS name, score " + "ORDER BY score DESC " + limitLines;

I am measuing the time for the subgraph-creation and the pageRank call.
The time is fluctuating from 15s down to 400ms.

I am doing nothing else than opening the DB and run the Cyphers.
Nodes=79
Edges=1034

EXECUTION TOOK: 6886ms.
EXECUTION TOOK: 6946ms.
EXECUTION TOOK: 6852ms.
EXECUTION TOOK: 12020ms.
EXECUTION TOOK: 389ms.
EXECUTION TOOK: 3726ms.
EXECUTION TOOK: 394ms.
EXECUTION TOOK: 356ms.
EXECUTION TOOK: 395ms.
EXECUTION TOOK: 349ms.
EXECUTION TOOK: 365ms.
EXECUTION TOOK: 371ms.
EXECUTION TOOK: 3577ms.
EXECUTION TOOK: 1657ms.
EXECUTION TOOK: 371ms.
EXECUTION TOOK: 354ms.
EXECUTION TOOK: 2717ms.
EXECUTION TOOK: 10865ms.
EXECUTION TOOK: 6928ms.
EXECUTION TOOK: 10663ms.
EXECUTION TOOK: 8735ms.
EXECUTION TOOK: 3541ms.
EXECUTION TOOK: 414ms.
EXECUTION TOOK: 321ms.
EXECUTION TOOK: 1471ms.
EXECUTION TOOK: 367ms.
EXECUTION TOOK: 1439ms.
EXECUTION TOOK: 2631ms.
EXECUTION TOOK: 399ms.
EXECUTION TOOK: 2679ms.
EXECUTION TOOK: 2544ms.

When I reduce the number of iterations, it takes less time but there is this fluctuating, too.

In debug.log I can see that pageRank is just hanging.
I see that there are sometimes waiting-times for about 1 second between iterations:

2021-08-05 05:22:04.758+0000 INFO  [o.n.k.a.p.GlobalProcedures] [gds-2] PageRankFactory 100%
2021-08-05 05:22:05.762+0000 INFO  [o.n.k.a.p.GlobalProcedures] [main] PageRankFactory :: Iteration 7 :: Finished
...
2021-08-05 05:22:05.778+0000 INFO  [o.n.k.a.p.GlobalProcedures] [gds-1] PageRankFactory 100%
2021-08-05 05:22:06.785+0000 INFO  [o.n.k.a.p.GlobalProcedures] [main] PageRankFactory :: Iteration 9 :: Finished

Most cases are fast without any gap.

2021-08-05 05:22:04.625+0000 INFO  [o.n.k.a.p.GlobalProcedures] [gds-2] PageRankFactory 100%
2021-08-05 05:22:04.631+0000 INFO  [o.n.k.a.p.GlobalProcedures] [main] PageRankFactory :: Iteration 9 :: Finished

Behavior is independent on heap-size.

Machine is a AMD Phenom II X6 1100T with 16GB RAM and SSDs.

Thanks in advance!
Marcus

1 REPLY 1

Hi,

it is working like charm with concurrency: 1.

Regards,
Marcus

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online