I have two dgraph clusters, both deployed v20.07 version dgraph using k8s.
Cluster1 | Cluster2 | |
---|---|---|
nodes | 6 | 1 |
Memory of each node | 32GB | 1TB |
hard disk | HDD | HDD |
groups | 2 | 3 |
replicas | 3 | 1 |
Data size of each group | 8GB、9.5GB | 961GB、800GB、1.1TB |
The data of Cluster2 contains all the data of Cluster1, When I run the same query like this:
{
xx(func: type(twitter_user)){
count(uid)
}
}
They returned the same result:{"count":41652230}
, but it took 9s for cluste1 and 20s for cluster2.
And cluster2 still has 580GB of free memory. In cluster1, the free memory of the machine that run the query is close to 200MB, and the node that does not run the query is close to 10GB.
I don’t understand why cluster2 is so slow. Is it because the data in a single group is too big? Should I add more groups to cluster2?