# How to plan the cluster size

**URL:** <https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506>\
**Category:** Dgraph\
**Tags:** kind:question, dgraph, area:operations\
**Created:** [April 13, 2020, 2:07am UTC](https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506 "2020-04-13T02:07:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 13, 2020, 2:07am UTC](https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506/1 "2020-04-13T02:07:56Z")

</div>

**Moved from GitHub [dgraph/5177](https://github.com/dgraph-io/dgraph/issues/5177)**

_Posted by_ [jameswangcnbj](https://github.com/jameswangcnbj):

My current machine configuration is 8core16GB, 3node  
After testing 400 million data imports, I found that the query is very slow. I am not sure whether the number of 3nodes currently used meets the requirements, or whether I use 6nodes, and then enable sharding. Could anyone give me some guidance?

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 15, 2020, 2:49pm UTC](https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506/2 "2020-04-15T14:49:34Z")

</div>

[ashish-goswami](https://github.com/ashish-goswami) _commented_ :

Hi @jameswangcnbj, thanks for reaching out to us. I would like to ask to you few things before suggesting anything:

- Dgraph version you are running.
- Size of `p` directory.
- Type of query you are running.
- Also what are memory and CPU usage when you are running that query. You can also collect profiles if possible([https://dgraph.io/docs/howto/#profiling-information](https://dgraph.io/docs/howto/#profiling-information))

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 17, 2020, 6:18am UTC](https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506/3 "2020-04-17T06:18:24Z")

</div>

[jameswangcnbj](https://github.com/jameswangcnbj) _commented_ :

dgraph 20.03  
p:20GB  
cpu:50% ram:60% or higher

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 20, 2020, 1:58pm UTC](https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506/4 "2020-04-20T13:58:33Z")

</div>

[ashish-goswami](https://github.com/ashish-goswami) _commented_ :

Hey @jameswangcnbj, Thanks for above information. Are you running all 3 nodes on same machine? How much queries are you serving when CPU/RAM usage are as above.  
As per above information query might be slow. Please tell us the type of query you are trying to run. Also expected and actual latency.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 22, 2020, 1:03am UTC](https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506/5 "2020-04-22T01:03:33Z")

</div>

[jameswangcnbj](https://github.com/jameswangcnbj) _commented_ :

no,i run 3node in 3 machine,i want to get the result in 10-500ms,the longest within 1s

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [April 23, 2020, 2:19pm UTC](https://discuss.dgraph.io/t/how-to-plan-the-cluster-size/8506/6 "2020-04-23T14:19:05Z")

</div>

[ashish-goswami](https://github.com/ashish-goswami) _commented_ :

@jameswangcnbj, if machines used for all alpha are different, this should be good enough. Please tell us the type of queries you are running. As part for query response, you can also check which part of query processing is consuming most time using debug param([https://dgraph.io/docs/query-language/#debug](https://dgraph.io/docs/query-language/#debug))
