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.
created_at: int . name: string @index(term, fulltext) . type: int . updated_at: int . xid: string @index(exact) . friend_of: uid @count @reverse .
First Person nodes were inserted. And then
friend_of edges were inserted to build the basic social structure.
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.
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.
For query performance, data was generated as per the linuxerwang recommendation. GitHub - linuxerwang/dgraph-bench: A benchmark program for dgraph.
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.
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.