It takes forever in executing the randomWalk algorithm

I'm currently trying to play with the 'randomWalk' algorithm, but it looks like it takes forever.
The named graph I created has 108 nodes and 584 relationships and this is the configuration I'm using.

CALL'gds-events-graph', {
start: id(node),
steps: 5,
walks: 5

Currently, I'm running that cypher in a Desktop database (4.2.1) with

Can anyone help me finding why it is so slow and how to speed up?

Alex Ough

Is it slow, or does it never finish? If it's just slow, can you share how long it's taking?

Can you:

  • Run gds.graph.list and share the statistics from gds-events-graph (how many nodes, how many relationships), and
  • Run gds.debug.sysInfo and post what it says?

The additional information will make it much easier to pinpoint the problem!

It never completes even 30 mins after.
I think I mentioned the numbers of nodes and relationships, but these are what you asked

"p99": 14,
"min": 1,
"max": 17,
"mean": 5.407407407407407,
"p90": 11,
"p50": 4,
"p999": 17,
"p95": 11,
"p75": 8
nodeCount: 108
relationshipCount: 584
density: 0.05053651782623745
"relationships": {
"ALL": {
"weight": "Float"
"nodes": {
"GDSEvent": {

gds_sysinfo.json.txt (5.9 KB)

Btw, is there anyway to see some kind of progress bar?

Alex Ough

There is progress logging in GDS! In 1.6 you need to enable it, but it's on by default in GDS 1.7 (and greatly improved).

My first recommendation - since everything else seems ok - would be to upgrade your library to GDS 1.6.5 (current GA release) or the preview of GDS 1.7.0 and try again. Also, you may want to check you neo4j debug logs to make sure there aren't any error messages reported there.

1 Like