# Elasticsearch search performance

**URL:** https://discuss.elastic.co/t/elasticsearch-search-performance/180130
**Category:** Elasticsearch
**Created:** [May 8, 2019, 8:36am UTC](https://discuss.elastic.co/t/elasticsearch-search-performance/180130 "2019-05-08T08:36:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flyniumeng](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@flyniumeng](https://discuss.elastic.co/u/flyniumeng)
#### Post date: [May 8, 2019, 8:36am UTC](https://discuss.elastic.co/t/elasticsearch-search-performance/180130/1 "2019-05-08T08:36:22Z")

</div>

hi,  
I use elasticsearch-py to search doc in elasticsearch . when i try to search doc under concurrent conditions , the time consumerd increased . I computed and traced the time consumed by urllib3(elasticsearch-py default http client) 。It seem like the same batch of requests took time to increase cumulatively。

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/1/61375f3b32f7b00692328c7758f276a17a720af6.png)  
the log format is :  
\<conneciton object,thread name, the request num summed up in the urllib3 pool , time consumed by http request \> . Different threads saw the same "request num " can be recognized as the were in the same batch 。 Such as : the first connection that returns the result with "request num" 810 consume time 0.006xx ms , it was normal 。 However, the subsequent request consumed time is constantly accumulating。 I want to know if there is any synchronization on the server side.

elasticsearh version is 6.4.2, elasticsearch-py version 6.3.1  
elasticsearch search thread pool config is :  
thread\_pool.search.queue\_size: 500  
thread\_pool.search.size: 100  
thread\_pool.search.min\_queue\_size: 10  
thread\_pool.search.max\_queue\_size: 1000  
thread\_pool.search.auto\_queue\_frame\_size: 2000  
thread\_pool.search.target\_response\_time: 6s

query is simple:  
{ 'query': {'match': {'question': 'xxxxx'}}, 'size': 10, 'from': 0}

In order to verify the problem, I did not use the any plugins .

thanks!

---

<div class="post-metadata">

### Author: ![flyniumeng](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@flyniumeng](https://discuss.elastic.co/u/flyniumeng)
#### Post date: [May 8, 2019, 11:23pm UTC](https://discuss.elastic.co/t/elasticsearch-search-performance/180130/2 "2019-05-08T23:23:28Z")

</div>

hi , is there any method use the elasticsearch-py with gevent ?

---

<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: [June 5, 2019, 11:23pm UTC](https://discuss.elastic.co/t/elasticsearch-search-performance/180130/3 "2019-06-05T23:23:35Z")

</div>

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