# Search latency & index latency for elasticsearch

**URL:** <https://discuss.elastic.co/t/search-latency-index-latency-for-elasticsearch/150901>\
**Category:** Elasticsearch\
**Created:** [October 3, 2018, 1:51pm UTC](https://discuss.elastic.co/t/search-latency-index-latency-for-elasticsearch/150901 "2018-10-03T13:51:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankur\_singla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankur_singla/32/45612_2.png) [@ankur\_singla](https://discuss.elastic.co/u/ankur_singla)\
**Post date:** [October 3, 2018, 1:51pm UTC](https://discuss.elastic.co/t/search-latency-index-latency-for-elasticsearch/150901/1 "2018-10-03T13:51:59Z")

</div>

We are continuously getting latency in both search & indexing. We are having a cluster of 15 nodes with 3 master eligible & rest 12 are data nodes each having 30 GB RAM and we have a traffic of 300 concurrent users. Any suggestions by which I can reduce the latency?

Here is the screenshot of kibana monitoring:

 ![kibana_logs](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e1a755b630b4e406c811375c93d4e98071595a2.png)

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [October 8, 2018, 9:07am UTC](https://discuss.elastic.co/t/search-latency-index-latency-for-elasticsearch/150901/2 "2018-10-08T09:07:29Z")

</div>

Hi,

if I see this correctly on the charts the highest reported latency for indexing is around 2.5 milliseconds and for search it spikes to roughly 12 milliseconds. Is a latency of 12 milliseconds problematic in practice or are you asking out of curiosity? Latency on this level can be caused by a lot of factors and you'd need to have a very heavily tuned system (including kernel and JVM tuning) to reduce those spikes. Some examples include:

- Garbage collection pauses (in the range of tens of milliseconds but you should expect multi-second spikes occasionally as well)
- Backpressure / blocking due to heavy disk I/O
- CPU scheduling pressure / threads moved to different CPU cores
- Kernel defragmenting memory
- Network backpressure / dropped packets
- ...

Daniel

---

<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:** [November 5, 2018, 9:07am UTC](https://discuss.elastic.co/t/search-latency-index-latency-for-elasticsearch/150901/3 "2018-11-05T09:07:30Z")

</div>

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