How to increase dgraph writing speed

I user dgraph4j to write data to Dgraph while I am facing a problem right now:

Here is my situation

  • I subscribe to Kafka, get data from it and clean it.
  • Then save data to both MySQL and Dgraph simultaneously.
  • My test dataset will be around 2 millions.

Here is my problem

  • MySQL save these record in an acceptable period(about half an hour), while dgraph needs to save these data
    for a real long time(only 10 thousands after a few hours)

My Dgraph deployment

  • Three hosts
  • One zero and One Server per host
  • 3 replicas and 4096 MB when starts up the dgraph server.

Do you know what exactly is taking the longest time? Is it disk I/O throttling? Memory usage? LRU cache eviction? You’rt

3 replicas and 4096 MB sounds reasonable. What’s the total memory size per instance running Dgraph Server? We recommend the --lru_mb size be set to roughly one-third of total memory available.