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”
services:
zero:
image: dgraph/dgraph:latest
volumes:
- /tmp/data:/dgraph
ports:
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --my=10.11.32.15:5080 --replicas 3
alpha:
image: dgraph/dgraph:latest
volumes:
- /tmp/data:/dgraph
ports:
- 7080:7080
- 8080:8080
- 9080:9080
restart: on-failure
command: dgraph alpha --my=10.11.32.15:7080 --zero=10.11.32.15:5080 --security whitelist=0.0.0.0/0

Dgraph metadata

v21.12.0

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 https://dgraph.io/docs/deploy/production-checklist/#cpu-and-memory 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.

Cheers.