Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graph benchmarks: LDBC SNB SF1

This repo contains LDBC Social Network Benchmarks (SNB) with a scale factor of 1 (SF1). The dataset is downloaded from the official source.

The aim of this benchmark is to study and compare the performance of graph systems on an established benchmark dataset. The queries suite run consists of 30 queries that touch various nodes via n-hop path traversals, with very different cardinalities, filters and projections applied to get a more holistic understanding of query performance.

The following systems are compared:

  • Neo4j
  • Kuzu (now archived)
  • Ladybug
  • lance-graph

Setup

We use uv to manage the dependencies.

# Sync the dependencies locally
uv sync

All the dependencies are listed in pyproject.toml.

Dataset

Download the LDBC dataset locally by running the given Python script download_dataset.py

uv run download_dataset.py

Alternatively, navigate to the LDBC site and manually download and unzip the dataset from this URL.

The schema of the LDBC SNB graph is shown below. There are 8 node types and 23 relationship types in the graph.

The individual and total number of nodes and relationships in the graph asre shown below.

Node counts:
- Comment: 2052169
- Forum: 90492
- Organisation: 7955
- Person: 9892
- Place: 1460
- Post: 1003605
- Tag: 16080
- Tagclass: 71

Relationship counts:
- commentHasCreator: 2052169
- commentHasTag: 2698393
- commentIsLocatedIn: 2052169
- containerOf: 1003605
- forumHasTag: 309766
- hasInterest: 229166
- hasMember: 1611869
- hasModerator: 90492
- hasType: 16080
- isPartOf: 1454
- isSubclassOf: 70
- knows: 180623
- likeComment: 1438418
- likePost: 751677
- organisationIsLocatedIn: 7955
- personIsLocatedIn: 9892
- postHasCreator: 1003605
- postHasTag: 713258
- postIsLocatedIn: 1003605
- replyOfComment: 1040749
- replyOfPost: 1011420
- studyAt: 7949
- workAt: 21654

Totals:
- nodes: 3181724
- relationships: 17256038

In total, there are 3.1M nodes and 17M relationships for the SF1 variant of this dataset.

Ingest the data as a graph

Navigate to the individual directories to see the instructions on how to ingest the data into each graph system. Once constructed, the graph is well-connected and has rich relationships between nodes of different types.

Queries

Navigate to each directory and see the query.py files for each of the 30 queries run in the benchmark.

High-level results

Query neo4j-2025.12.1 (ms) kuzu-0.11.3 (ms) ladybug-0.15.3 (ms) lance-graph-0.5.4 (ms)
q1 4.9ms 2.3ms (2.2x) 3.4ms (1.4x) 2.3ms (2.1x)
q2 5.9ms 1.4ms (4.1x) 2.3ms (2.6x) 3.3ms (1.8x)
q3 2.9ms 1.2ms (2.4x) 2.0ms (1.5x) 3.1ms (0.9x)
q4 4.1ms 1.0ms (4.0x) 1.6ms (2.5x) 4.2ms (1.0x)
q5 4.9ms 3.8ms (1.3x) 5.9ms (0.8x) 3.0ms (1.6x)
q6 3.9ms 0.8ms (5.0x) 1.4ms (2.8x) 1.3ms (2.9x)
q7 2.2ms 31.1ms (0.1x) 50.1ms (0.0x) 19.1ms (0.1x)
q8 14.6ms 2.9ms (5.1x) 4.5ms (3.2x) 2.0ms (7.4x)
q9 2.8ms 2.1ms (1.4x) 3.5ms (0.8x) 3.4ms (0.8x)
q10 4.9ms 1.8ms (2.7x) 3.1ms (1.6x) 32.3ms (0.2x)
q11 14.9ms 8.5ms (1.8x) 13.6ms (1.1x) 5.1ms (2.9x)
q12 8.1ms 20.7ms (0.4x) 23.9ms (0.3x) 22.2ms (0.4x)
q13 9.9ms 50.8ms (0.2x) 82.8ms (0.1x) 11.5ms (0.9x)
q14 1.7ms 1.7ms (1.0x) 2.8ms (0.6x) 4.0ms (0.4x)
q15 3.3ms 2.7ms (1.2x) 4.4ms (0.7x) 3.5ms (0.9x)
q16 2.4ms 2.0ms (1.2x) 3.2ms (0.7x) 5.7ms (0.4x)
q17 4.9ms 3.0ms (1.6x) 4.8ms (1.0x) 3.8ms (1.3x)
q18 3.7ms 1.8ms (2.0x) 2.8ms (1.3x) 3.0ms (1.2x)
q19 7.8ms 12.4ms (0.6x) 22.5ms (0.3x) 25.8ms (0.3x)
q20 475.7ms 11.9ms (39.9x) 17.0ms (28.0x) 3.6ms (133.5x)
q21 1.8ms 0.6ms (3.2x) 0.9ms (2.1x) 2.6ms (0.7x)
q22 3.6ms 24.2ms (0.2x) 26.6ms (0.1x) 16.7ms (0.2x)
q23 3.9ms 1.4ms (2.8x) 2.3ms (1.7x) 3.9ms (1.0x)
q24 1.6ms 1.5ms (1.1x) 2.4ms (0.7x) 2.9ms (0.6x)
q25 3.1ms 1.8ms (1.7x) 2.9ms (1.1x) 2.4ms (1.3x)
q26 1.8ms 3.7ms (0.5x) 5.9ms (0.3x) 4.5ms (0.4x)
q27 3.5ms 15.2ms (0.2x) 24.0ms (0.1x) 32.3ms (0.1x)
q28 3.9ms 1.7ms (2.3x) 3.5ms (1.1x) 4.2ms (0.9x)
q29 2.9ms 1.3ms (2.3x) 2.3ms (1.2x) 3.7ms (0.8x)
q30 1255.2ms 158.7ms (7.9x) 231.9ms (5.4x) 38.8ms (32.3x)

The fastest and slowest systems for each query can be visualized via the following heatmap.

About

Graph benchmarks for Kuzu, Ladybug and lance-graph on LDBC SNB dataset

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages