Currently I am working on a task to see how Dgraph behaves when run with 1 TB data. I will list down my experiments and findings in this blog post.
Enviroment:
Linux ashish-test1 5.3.0-1026-gcp #28~18.04.1-Ubuntu SMP Sat Jun 6 00:09:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Dgraph Version:
Dgraph version : v20.07.0-beta.Jun22-35-gfbae026b3
Dgraph SHA-256 : 7d7c53edebc7a5db8d75983521eb922d3b76526fd8a54de5e627b450f89274e2
Commit SHA-1 : fbae026b3
Commit timestamp : 2020-07-09 16:45:42 +0530
Branch : release/v20.07
Go version : go1.14.4
Cluster setup
Currently I am running 1 Zero, 1 Alpha server cluster.
Work loads
I am currently running workloads from the repository GitHub - linuxerwang/dgraph-bench: A benchmark program for dgraph.
Initial data size of cluster
I have bootstrapped cluster by running bulk loader on ~800M RDFs. Resulting p
directory size is ~50GB. RDF file can be generated using data generator
present in same repository.
Config file for workloads
bench_cases:
- name: "get-friends-one-hop"
concurrency: 8
- name: "get-friends-two-hop"
concurrency: 8
- name: "insert-friend"
concurrency: 8
- name: "insert-person"
concurrency: 8
Schema
<created_at>: int .
<dgraph.acl.rule>: [uid] .
<dgraph.graphql.schema>: string .
<dgraph.graphql.xid>: string @index(exact) @upsert .
<dgraph.rule.permission>: int .
<dgraph.rule.predicate>: string @index(exact) @upsert .
<dt>: default .
<friend_of>: uid @reverse .
<name>: default .
<patronymic>: default .
<rel_1>: [uid] .
<rel_2>: [uid] .
<rel_3>: [uid] .
<surname>: default .
<updated_at>: int .
<xid>: default .
Observations
Throughput numbers:
Note: Time elapsed is number of seconds passed since start. Hence below observations are after running workloads for around ~22 hours.
Time elapsed: 78315, Taskname: get-friends-one-hop, Speed: 101
Time elapsed: 78315, Taskname: insert-friend, Speed: 99
Time elapsed: 78316, Taskname: insert-person, Speed: 111
Time elapsed: 78316, Taskname: insert-friend, Speed: 108
Time elapsed: 78316, Taskname: get-friends-one-hop, Speed: 90
Time elapsed: 78316, Taskname: get-friends-two-hop, Speed: 92
Time elapsed: 78317, Taskname: insert-person, Speed: 90
Time elapsed: 78317, Taskname: insert-friend, Speed: 89
Time elapsed: 78317, Taskname: get-friends-one-hop, Speed: 93
Time elapsed: 78317, Taskname: get-friends-two-hop, Speed: 92
Time elapsed: 78318, Taskname: insert-person, Speed: 93
Time elapsed: 78318, Taskname: insert-friend, Speed: 94
Time elapsed: 78318, Taskname: get-friends-one-hop, Speed: 90
Time elapsed: 78318, Taskname: get-friends-two-hop, Speed: 87
Time elapsed: 78319, Taskname: insert-person, Speed: 91
Time elapsed: 78319, Taskname: insert-friend, Speed: 89
Time elapsed: 78319, Taskname: get-friends-one-hop, Speed: 89
Time elapsed: 78319, Taskname: get-friends-two-hop, Speed: 82
Time elapsed: 78320, Taskname: insert-person, Speed: 89
Time elapsed: 78320, Taskname: insert-friend, Speed: 87
Time elapsed: 78320, Taskname: get-friends-one-hop, Speed: 86
Time elapsed: 78320, Taskname: get-friends-two-hop, Speed: 90
Time elapsed: 78321, Taskname: insert-person, Speed: 85
Time elapsed: 78321, Taskname: get-friends-one-hop, Speed: 92
Time elapsed: 78321, Taskname: insert-friend, Speed: 86
Time elapsed: 78321, Taskname: get-friends-two-hop, Speed: 84
Current size of p
directory:
~54GB
Work in progress items
- We are thinking about ways to reach 1 TB size quickly.
- We are also thinking of having our own workloads. Above workloads only covers very few things in query/mutations and have been used just for starting.