Linuxerwang Test Benchmark Result

Github Repository: GitHub - linuxerwang/dgraph-bench: A benchmark program for dgraph.

Note: All test scenarios were run on a single machine. Cluster configuration like 1 alpha 1 zero or 3 alpha 1 zero was on one machine and benchmarks were running on another machine.

Data Model


created_at: int  .
name: string @index(term, fulltext) .
type: int  .
updated_at: int  .
xid: string @index(exact)  .
friend_of: uid @count @reverse .

General Test setup

First Person nodes were inserted. And then friend_of edges were inserted to build the basic social structure.



1 Zero 1 Alpha Node Insertion

Insert Person node operation was run for an hour. The average request rate was around 9k/sec with 0.2sec as 99 percentile. Around 9 million nodes were inserted during this period.

1 Zero 3 Alpha Edge Insertion

Initially, approximately 13M People nodes were inserted. Then Insert friend queries were run for 24 hours in a loop via 100 goroutines. We were able to insert around 370M edges approximately.

We were able to insert. The edge insertion rate started at 12k/sec but steadied around 4k/sec after a few hours. The same relative trend can be seen from the request duration percentile graph.

Performance improvement can be seen in v1.0.x to v20.11. The sudden performance drops are no longer noticed during the simulation.

Query Performance

For query performance, data was generated as per the linuxerwang recommendation. GitHub - linuxerwang/dgraph-bench: A benchmark program for dgraph.

Query One Hop

Tests ran for 5 hours with a pretty consistent request rate of around 13k/sec. The average request duration with 99 percetile is around 50ms and 30 ms 95 percentile.

Query Two Hop

Tests ran for approximately 3 hours with a pretty consistent request rate of around 1.6k/sec. The average request duration with 99 percentile is around 800ms and 220 ms 95 percentile.

Note: For Previous Revision metrics were

For one-hop friends query, it can easily handle 10k QPS on 100 concurrent request workers at ~300ms 99 percentile and 80ms 95 percentile. On two-hop friends query, dgraph provides ~1000 QPS on ~0.95s 95% percentile.

1 Like

Nice. Consistent by the looks of it. Did you notice any of the sudden jumps or drops etc.?

No, i ran it for extended hours. The pattern of continuous performance jump and exponential degradation every few hours isn’t observed in 20.11 even after 24 hours. The only variable was all 3 alpha and 1 zero are on the same machine while original setup uses separate machines. This will add some network latency but not something that will disrupt the behaviour.