Alter is slow and multithread mutation cost 95% of cpu for v21.12.0

To facilitate better answering of questions, if you have a question, please fill in the following info. Otherwise, please delete the template.

What I want to do

I alter a new schema when over 5000 schema has built in dgraph, it takes almost 5min to do this.
when I create 200 thread to mutation 10000 record in the schema that has only one predicate, it takes 10min and cpu raise to 90%.

What I did

I have read the docs about configs but not found the way to improve this , also I have raise the server of dgraph from 8c16g to 8c32g ,and still not resolve the problem.

below is the compose config.

version: “3.2”
image: dgraph/dgraph:latest
- /tmp/data:/dgraph
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --my= --replicas 3
image: dgraph/dgraph:latest
- /tmp/data:/dgraph
- 7080:7080
- 8080:8080
- 9080:9080
restart: on-failure
command: dgraph alpha --my= --zero= --security whitelist=

Dgraph metadata


Hi Troy

What is the issue exactly? It is expected that more resources gets being used during a high load. So, there are any concern with this? Is it panicking?

Is this AWS? 8 cores with 32GB of RAM? This is the minimum requirements for idle usage. If you are developing your application that’s a good setup. But for production or production tests you should improve your setup resources.

Anyway, if there is any other concern let me know.