Try the new feature (you gonna need more memory on docker, something like 14GB+ to run 21 million RDFs) called ludicrous mode (eventually consistent writes). It hasn’t been released yet, use it sparingly. And disable it after you have loaded the dataset.
This mode is not recommended for financial systems.
docker pull dgraph/dgraph:master
docker run -d -p 5080:5080 -p 6080:6080 -p 8080:8080 -p 9080:9080 -p 8000:8000 -v ~/dgraph:/dgraph --name dgraph dgraph/dgraph:master dgraph zero --ludicrous_mode
docker exec -d dgraph dgraph alpha --zero localhost:5080 --ludicrous_mode
docker exec -it dgraph sh
AND
curl --progress-bar -LS -o 21million.rdf.gz "https://github.com/dgraph-io/benchmarks/blob/master/data/release/21million.rdf.gz?raw=true"
curl --progress-bar -LS -o release.schema "https://github.com/dgraph-io/benchmarks/blob/master/data/release/release.schema?raw=true"
ls
Then
dgraph live -f 21million.rdf.gz -s release.schema --conc=100 --batch=10000
Decrease the values of conc and batch according to your machine (do some testing of parameters to find out which is the best)