# High search\_fetch\_time for elasticsearch cluster

**URL:** https://discuss.elastic.co/t/high-search-fetch-time-for-elasticsearch-cluster/325625
**Category:** Elasticsearch
**Created:** [February 15, 2023, 2:16pm UTC](https://discuss.elastic.co/t/high-search-fetch-time-for-elasticsearch-cluster/325625 "2023-02-15T14:16:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jaykb77](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jaykb77](https://discuss.elastic.co/u/jaykb77)
#### Post date: [February 15, 2023, 2:16pm UTC](https://discuss.elastic.co/t/high-search-fetch-time-for-elasticsearch-cluster/325625/1 "2023-02-15T14:16:18Z")

</div>

We started seeing some high latency with the applications querying elasticsearch(7.17.0) and found that _search\_fetch\_time_ is significantly increasing whenever there is some significant increase in incoming search traffic.

When analysing the _search\_fetch\_time_ metrics further, it was seen that some specific indices have the highest fetch time and they were configured **1primary:1replica.**

1. Can any one suggest how to improve _search\_fetch\_time_?

2. Would increasing replicas improve the situation as it seems to help with parallel searching?

3. Are there any tradeoffs, other than the obvious disk space requirement, when increasing shards/replicas for any index?

---

<div class="post-metadata">

### Author: ![eMitch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emitch/32/93607_2.png) [@eMitch](https://discuss.elastic.co/u/eMitch)
#### Post date: [February 15, 2023, 5:13pm UTC](https://discuss.elastic.co/t/high-search-fetch-time-for-elasticsearch-cluster/325625/2 "2023-02-15T17:13:03Z")

</div>

Hi @jaykb77

There could be quite a few things to consider in this situation, but here are some general thoughts.

1. _search\_fetch\_time_ mostly has to do with fetching the docs from the shards/segments after they've been identified - so things to consider would be disk speeds, result set sizes, document sizes, and document enrichment. All of these (plus some other compounding factors) could be looked at the help make that speed faster. I would generally start with Disk performance and contention.
2. Increasing replicas may help improve your fetch speeds if there is contention with the nodes that have the current primary/replicas. This would allow for more copies of the data on the more nodes that the search can pull from to return to the coordinator.
3. anytime you adjust your sharding and/or replication strategy, you should take your ingest vs search throughput into consideration. in this scenario, if you have a single primary shard and one replica to start, then add four more replicas, that's potentially much more overhead for the ingestion of new data as it has to be replicated out.

---

<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: [March 15, 2023, 5:13pm UTC](https://discuss.elastic.co/t/high-search-fetch-time-for-elasticsearch-cluster/325625/3 "2023-03-15T17:13:21Z")

</div>

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