See the benchmarks (Click here)
Get mission-critical performance even under extreme workloads, with response times staying under 140ms at p99, while competitors struggle with multi-second latencies. Reduce infrastructure costs and improve user experience with FalkorDB's superior performance profile, requiring fewer resources to handle peak workloads.
| Percentile | FalkorDB (ms) | Neo4j (ms) | Performance Difference |
|---|---|---|---|
| p50 (median) | 55.0 | 577.5 | 10.5x faster |
| p90 | 108.0 | 4784.1 | 44.3x faster |
| p99 | 136.2 | 46923.8 | 344.5x faster |
This benchmark provides comprehensive performance comparisons between FalkorDB and Neo4j graph databases. This benchmark specifically focuses on aggregate expansion operations, a common workload in graph database applications. The results indicate FalkorDB's particular strength in maintaining consistent performance under varying workload conditions, especially crucial for production environments where predictable response times are essential.
- Ubuntu
- Redis server
- build-essential, cmake, m4, automake
- libtool, autoconf, python3
- libomp-dev, libssl-dev
- pkg-config
- Rust toolchain
- SDKman
- unzip, zip
sudo apt-get install lsb-release curl gpg
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis- stop the redis server
sudo systemctl stop redis-server - disable the redis server
sudo systemctl disable redis-server - check the redis server status
sudo systemctl status redis-server
- install unzip
sudo apt install unzip zip -y curl -s "https://get.sdkman.io" | bash- load sdkman in the current shell
source "$HOME/.sdkman/bin/sdkman-init.sh"
git clone --recurse-submodules -j8 https://github.com/FalkorDB/FalkorDB.gitsudo apt install build-essential cmake m4 automake libtool autoconf python3 libomp-dev libssl-dev- install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - from FalkorDB root dir run
make
from ~/
- install pkg-config
sudo apt install pkg-config -y git clone git@github.com:FalkorDB/benchmark.gitcd benchmarksdk env install- download and unpack neo4j
./scripts/download-neo4j.sh - build the benchmark
cargo build --release - enable autocomplete
source <(./target/release/benchmark generate-auto-complete bash) - copy the falkor shared lib to
cp ~/FalkorDB/bin/linux-x64-release/src/falkordb.so .
Use the wrapper scripts in scripts/ for the fastest end-to-end benchmark activation:
scripts/run_small_benchmark.shscripts/run_medium_benchmark.shscripts/run_large_benchmark.sh
Each script handles the full pipeline for its dataset size:
- clears and loads enabled vendors
- generates vendor-specific query files
- runs benchmark workloads
- writes results into a shared
RESULTS_DIR - aggregates UI-ready summaries
Quick start:
./scripts/run_small_benchmark.sh
./scripts/run_medium_benchmark.sh
./scripts/run_large_benchmark.shRun only Falkor primary + secondary comparison:
RUN_FALKOR=1 RUN_FALKOR_2=1 RUN_NEO4J=0 RUN_MEMGRAPH=0 ./scripts/run_medium_benchmark.shOverride workload shape:
QUERIES_COUNT=25000 WRITE_RATIO=0.05 PARALLEL=10 MPS=3000 ./scripts/run_medium_benchmark.shPoint wrappers to external endpoints:
FALKOR_ENDPOINT=falkor://127.0.0.1:6379 \
FALKOR_ENDPOINT_2=falkor://127.0.0.1:6800 \
NEO4J_ENDPOINT=neo4j://127.0.0.1:7687 \
MEMGRAPH_ENDPOINT=bolt://127.0.0.1:17687 \
./scripts/run_small_benchmark.shCommon environment knobs:
- vendor toggles:
RUN_FALKOR,RUN_FALKOR_2,RUN_NEO4J,RUN_MEMGRAPH - workload controls:
BATCH_SIZE,PARALLEL,MPS,QUERIES_COUNT,WRITE_RATIO,QUERIES_FILE - algorithm toggles:
ENABLE_ALGO_PAGERANK,ENABLE_ALGO_MAX_FLOW,ENABLE_ALGO_MSF,ENABLE_ALGO_HARMONIC - output folder:
RESULTS_DIR - Falkor timeout tuning (medium/large wrappers):
FALKOR_QUERY_TIMEOUT_MS
./generate_docker_compose.shdocker-compose upThe benchmark is a cli tool that can be used to run the benchmarks
➜ cargo run --bin benchmark -- --help git:(prometheus|✚7…3
Usage: benchmark <COMMAND>
Commands:
generate-auto-complete
load load data into the database
generate-queries generate a set of queries and store them in a file to be used with the run command
run run the queries generated by the GenerateQueries command against the chosen vendor
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print versioncargo run --release --bin benchmark -- load --vendor falkor -s smallcargo run --release --bin benchmark -- load --vendor neo4j -s smallcargo run --release --bin benchmark -- load --vendor memgraph -s small
NOTE: It is possible to use the load command with externally run vendor endpoint:
cargo run --release --bin benchmark -- load --vendor falkor -s small --endpoint falkor://127.0.0.1:6379cargo run --release --bin benchmark -- load --vendor neo4j -s small --endpoint neo4j://neo4j:benchmark123@127.0.0.1:7687cargo run --release --bin benchmark -- load --vendor memgraph -s small --endpoint bolt://127.0.0.1:7687
cargo run --release --bin benchmark -- generate-queries -s10000000 --dataset small --name=small-readonly --write-ratio 0.0
NOTE: preparing a smaller run of 1,000,000 queries:
cargo run --release --bin benchmark -- generate-queries -s1000000 --dataset small --name=small-readonly --write-ratio 0.0
cargo run --release --bin benchmark run --vendor falkor --name small-readonly -p40 --mps 4000cargo run --release --bin benchmark run --vendor neo4j --name small-readonly -p40 --mps 4000cargo run --release --bin benchmark run --vendor memgraph --name small-readonly -p40 --mps 4000
NOTE: It is possible to use the run command externally run vendor endpoint:
cargo run --release --bin benchmark run --vendor falkor --name small-readonly -p40 --mps 4000 --endpoint falkor://127.0.0.1:6379cargo run --release --bin benchmark run --vendor neo4j --name small-readonly -p40 --mps 4000 --endpoint neo4j://neo4j:benchmark123@127.0.0.1:7687cargo run --release --bin benchmark run --vendor memgraph --name small-readonly -p40 --mps 4000 --endpoint bolt://127.0.0.1:7687
The benchmark is designed to run the same workload against multiple vendors and then generate a pairwise comparison report.
- Run each vendor into the same results directory (so it contains
Results-.../<vendor>/{meta.json,metrics.prom}):
cargo run --release --bin benchmark -- run --vendor falkor --name small-readonly -p40 --mps 4000 --results-dir Results-YYMMDD-HH:MMcargo run --release --bin benchmark -- run --vendor neo4j --name small-readonly -p40 --mps 4000 --results-dir Results-YYMMDD-HH:MMcargo run --release --bin benchmark -- run --vendor memgraph --name small-readonly -p40 --mps 4000 --results-dir Results-YYMMDD-HH:MM
- Aggregate into UI-ready JSON summaries:
cargo run --release --bin benchmark -- aggregate --results-dir Results-YYMMDD-HH:MM --out-dir ui/public/summaries
This produces:
ui/public/summaries/neo4j_vs_falkordb.jsonui/public/summaries/memgraph_vs_falkordb.json
AWS instance comparisons (e.g. Graviton vs Intel for FalkorDB runs stored under aws-tests/):
cargo run --release --bin benchmark -- aggregate-aws-tests --aws-tests-dir aws-tests --out-path ui/public/summaries/aws_tests_falkor_graviton_vs_intel.json
- Open the UI:
cd ui && npm install && npm run dev
The comparison pages load only the relevant vendor pair:
/neo4jcompares Neo4j vs FalkorDB/memgraphcompares Memgraph vs FalkorDB
Workloads generated by generate-queries embed a stable q_id and a query catalog (mapping id -> query name). During run, the benchmark exports per-query latency percentiles (P10..P99) into metrics.prom and the aggregator emits them under result.histogram_for_type.
Important: if you change the query set/metrics, regenerate the workload file before running:
cargo run --release --bin benchmark -- generate-queries --dataset small -s1000000 --name small-readonly --write-ratio 0.0
For convenience wrappers that load data, regenerate queries, run workloads, and aggregate UI summaries, see:
scripts/run_small_benchmark.shscripts/run_medium_benchmark.shscripts/run_large_benchmark.sh
For the maintained query catalog guide (including phase-1 additions and sample Cypher), see:
QUERY_EXPLANATIONS_AND_SAMPLES.md
run simulation to see that the benchmark itself can sustain specific mps given a fixed latency on that hardware
For example, simulate 40 clients that send at 5000 messages per seconds with latency of one millisecond per call.
cargo run --release --bin benchmark run --vendor falkor --name small -p40 --mps 5000 --simulate 1
The data is based on https://www.kaggle.com/datasets/wolfram77/graphs-snap-soc-pokec licensed: https://creativecommons.org/licenses/by/4.0/
Q: What are the minimum system requirements?
A: FalkorDB requires a Linux/Unix system with 4GB RAM minimum. For production environments, 16GB RAM is recommended.
Q: Can I run FalkorDB without Redis?
A: No, FalkorDB requires Redis 6.2 or higher as it operates as a Redis module.
Q: Which query language does FalkorDB use?
A: FalkorDB uses the Cypher query language, similar to Neo4j, making migration straightforward.
Q: Does FalkorDB support data persistence?
A: Yes, through Redis persistence mechanisms (RDB/AOF). Additional persistence options are in development.
Q: Does FalkorDB support common programming languages?
A: Yes, through FalkorDB has set of clients in all these programming langauges and more
see official clients
Q: Is FalkorDB production-ready?
A: Yes, FalkorDB is stable for production use, being a continuation of the battle-tested RedisGraph codebase.
Q: What should I do if I get "libgomp.so.1: cannot open shared object file"?
A: Install OpenMP:
- Ubuntu:
apt-get install libgomp1 - RHEL/CentOS:
yum install libgomp - OSX:
brew install libomp
Q: Can I migrate from Neo4j to FalkorDB?
A: Yes, FalkorDB supports the Cypher query language, making migration from Neo4j straightforward. Migration tools are in
development.
- Accessing grafana http://localhost:3000
- Accessing prometheus http://localhost:9090
- sum by (vendor, spawn_id) (rate(operations_total{vendor="falkor"}[1m])) redis
- rate(redis_commands_processed_total{instance=~"redis-exporter:9121"}[1m])
- redis_connected_clients{instance=~"redis-exporter:9121"}
- topk(5, irate(redis_commands_total{instance=~"redis-exporter:9121"} [1m]))
- redis_blocked_clients
- redis_commands_total
- redis_commands_failed_calls_total
- redis_commands_latencies_usec_count
- redis_commands_rejected_calls_total
- redis_io_threaded_reads_processed
- redis_io_threaded_writes_processed
- redis_io_threads_active
- redis_memory_max_bytes
- redis_memory_used_bytes
- redis_memory_used_peak_bytes
- redis_memory_used_vm_total