# Kibana field\_stats request takes 20000 ms if number of Indices and shards are more

**URL:** <https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468>\
**Category:** Kibana\
**Created:** [March 4, 2016, 3:36am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468 "2016-03-04T03:36:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 4, 2016, 3:36am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/1 "2016-03-04T03:36:43Z")

</div>

Hi Team , i am getting high response times for the field stats request , if i am having around 240 shards with daily indices . Can you please suggest how can i reduce these response times with that many number of open shards.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 4, 2016, 4:11am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/2 "2016-03-04T04:11:37Z")

</div>

How much heap does ES have?

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 4, 2016, 9:12am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/3 "2016-03-04T09:12:01Z")

</div>

ES has 7 data nodes with 30 GB of heap every node.

---

<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:** [March 4, 2016, 9:19am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/4 "2016-03-04T09:19:46Z")

</div>

How are you measuring this latency? Is this just for the field\_stats call or for the following aggregation as well?

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 4, 2016, 9:23am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/5 "2016-03-04T09:23:12Z")

</div>

Its just the Field Stats , I tested multiple options like kept all the 240 shards opened in memory and executed the request from Kibana for the default 15 mins results .Then I closed certain Indices and then again reloaded the kibana UI and checked the field\_stats response in Network sniffer in Developer Tools of Mozilla Firefox .

---

<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:** [March 4, 2016, 9:28am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/6 "2016-03-04T09:28:16Z")

</div>

That sounds odd. What is the load on the cluster? Are you seeing a lot of long GC? Which version of Elasticsearch are you on?

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 4, 2016, 9:32am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/7 "2016-03-04T09:32:27Z")

</div>

I am using ES 2.1 , Kibana 4.3.0 , Load on the cluster is like i am indexing around 25-30 GB of data daily in Elasticsearch and I have not yet analysed the GC runs rather i have tried to reduce the number of shards per Index , earlier I was using 5 shards per Index and now I have reduced it to 1 Shard per index and tried creating Daily Index.  
If I have 240 Open shards also , this issue should not come ? I thing I am using NAS storage . Would it cause an issue in field\_stats response ?

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 4, 2016, 7:05pm UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/8 "2016-03-04T19:05:07Z")

</div>

Hi team,  
Please suggest what would be the option to resolve the slowness of field\_stats.

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 8, 2016, 5:17pm UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/9 "2016-03-08T17:17:56Z")

</div>

Hi Team, Please suggest what could cause the field\_stats to be slow with more number of Shards.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 11, 2016, 10:52pm UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/10 "2016-03-11T22:52:33Z")

</div>

What sort of NAS storage is this?

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 13, 2016, 11:54pm UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/11 "2016-03-13T23:54:52Z")

</div>

It is nfs4 storage.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 14, 2016, 12:56am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/12 "2016-03-14T00:56:10Z")

</div>

But are you mounting something locally that ES then runs on?

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 14, 2016, 3:14am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/13 "2016-03-14T03:14:35Z")

</div>

No I have not mounted anything locally. When I reduced the shards from 240 to 50 , field stats response came down drastically from 20000 ms to 2700 ms

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 14, 2016, 3:57am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/14 "2016-03-14T03:57:35Z")

</div>

> [@soodlikesjava](#):
>
> No I have not mounted anything locally.

Then how is it setup?

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [March 16, 2016, 5:43am UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/15 "2016-03-16T05:43:16Z")

</div>

oh sorry i thought you were asking if i mounted anything else apart from my nfs . I have mounted the NFSshare on my hypervisors and my Elasticsearch is deployed in VMs created by those hypervisors and Elasticsearch is using the same nfsmount for storing the indices.

---

<div class="post-metadata">

**Author:** ![diranged](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diranged/32/4065_2.png) [@diranged](https://discuss.elastic.co/u/diranged)\
**Post date:** [December 6, 2016, 4:00pm UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/16 "2016-12-06T16:00:06Z")

</div>

I've recently opened an issue on Github to dig into this ([https://github.com/elastic/kibana/issues/9386](https://github.com/elastic/kibana/issues/9386)) .. we're seeing the same issue, but its upwards of 35s to return the query. I strongly suspect that its our "warm" data nodes that hold the majority of our data, but is old "closed" indexes. I think that they're slower to respond, and this query requires all the nodes in the cluster to respond it seems.

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [January 8, 2017, 9:02pm UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/17 "2017-01-08T21:02:38Z")

</div>

> [@diranged](#):
>
> [Super slow Kibana UI on first load .. related to /\_field\_stats API call. · Issue #9386 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/9386)

Thanks for the reference , i will try to follow github issue .

---

<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:** [July 6, 2017, 1:33pm UTC](https://discuss.elastic.co/t/kibana-field-stats-request-takes-20000-ms-if-number-of-indices-and-shards-are-more/43468/18 "2017-07-06T13:33:31Z")

</div>


