# Can I control max concurrent shard request about APM dashboard?

**URL:** <https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301>\
**Category:** Kibana\
**Created:** [December 4, 2018, 7:14am UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301 "2018-12-04T07:14:18Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![toughrogrammer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toughrogrammer/32/38160_2.png) [@toughrogrammer](https://discuss.elastic.co/u/toughrogrammer)\
**Post date:** [December 4, 2018, 7:14am UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/1 "2018-12-04T07:14:18Z")

</div>

I could speed up for discover and visualize with max concurrent shard request option.  
But I looks like there isn't max concurrent shard request parameter about APM.  
Is there any another options?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 4, 2018, 8:50am UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/2 "2018-12-04T08:50:39Z")

</div>

How many indices and shards are you querying?

---

<div class="post-metadata">

**Author:** ![toughrogrammer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toughrogrammer/32/38160_2.png) [@toughrogrammer](https://discuss.elastic.co/u/toughrogrammer)\
**Post date:** [December 4, 2018, 11:37am UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/3 "2018-12-04T11:37:06Z")

</div>

My apm transaction and span indices are created daily and each indices are consisted of 20 shard.  
There are only 4 days but there will be more indices.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 4, 2018, 11:40am UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/4 "2018-12-04T11:40:18Z")

</div>

Why do you have 20 shards per index? How many daily indices do you create? How much data do you ingest per day?

Having lots of small indices and shards can be very inefficient, so try to follow the guidelines outlined in [this blog post about shards and sharding practices](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster).

---

<div class="post-metadata">

**Author:** ![toughrogrammer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toughrogrammer/32/38160_2.png) [@toughrogrammer](https://discuss.elastic.co/u/toughrogrammer)\
**Post date:** [December 4, 2018, 12:00pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/5 "2018-12-04T12:00:07Z")

</div>

Transaction indices are almost 1TB per daily. I though 5 shards is too few for big size indices.  
Hourly indices is more better in this case?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 4, 2018, 12:02pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/6 "2018-12-04T12:02:28Z")

</div>

What is the average shard size? What is your retention period for this data?

---

<div class="post-metadata">

**Author:** ![toughrogrammer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toughrogrammer/32/38160_2.png) [@toughrogrammer](https://discuss.elastic.co/u/toughrogrammer)\
**Post date:** [December 4, 2018, 12:10pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/7 "2018-12-04T12:10:59Z")

</div>

Sorry. 1TB was invalid.  
Primary index size is almost 350GB ~ 400GB and I suppose average shard size is about 20GB.  
There isn't enough data yet but my goal of retention period is 7 to 14 days.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 4, 2018, 12:12pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/8 "2018-12-04T12:12:26Z")

</div>

How many nodes do you have in your cluster? What is the specification of these nodes? What type of storage are you using?

---

<div class="post-metadata">

**Author:** ![toughrogrammer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toughrogrammer/32/38160_2.png) [@toughrogrammer](https://discuss.elastic.co/u/toughrogrammer)\
**Post date:** [December 4, 2018, 12:24pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/9 "2018-12-04T12:24:34Z")

</div>

There are 8 i3.2xlarge(NVMe SSD) ec2 instances. Maybe i will need to add more nodes.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 4, 2018, 12:27pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/10 "2018-12-04T12:27:45Z")

</div>

If you have only one daily index and your average shard size is indeed 20GB, it sounds quite reasonable. If you are experiencing performance problems I would look at the cluster to see what is likely to limit performance. As your nodes have fast SSDs I would look at CPU utilisation as querying and indexing can be CPU intensive. Also look out for any issues related to GC in the Elasticsearch logs.

---

<div class="post-metadata">

**Author:** ![toughrogrammer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/toughrogrammer/32/38160_2.png) [@toughrogrammer](https://discuss.elastic.co/u/toughrogrammer)\
**Post date:** [December 4, 2018, 12:36pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/11 "2018-12-04T12:36:53Z")

</div>

Thanks for your advice.  
I checked each node's CPU utilization and it was very high when I query.  
But is there any solution without scale out?  
Here is my monitoring metrics.  
CPU spike time is when I queried.

 ![31%20PM](https://us1.discourse-cdn.com/elastic/original/3X/e/e/eebce59f6a694de8eeba50ecf8b9a48c18ccd01c.png)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 4, 2018, 2:07pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/12 "2018-12-04T14:07:21Z")

</div>

It looks like you at times are limited by CPU, so scaling out is one way to address it. Otherwise you may need to try and reduce CPU usage, but I am not sure how to best go about that.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 1, 2019, 2:07pm UTC](https://discuss.elastic.co/t/can-i-control-max-concurrent-shard-request-about-apm-dashboard/159301/13 "2019-01-01T14:07:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
