# Reduce threads used by elasticsearch

**URL:** https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271
**Category:** Elasticsearch
**Created:** [June 23, 2014, 8:34pm UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271 "2014-06-23T20:34:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jnortey](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@jnortey](https://discuss.elastic.co/u/jnortey)
#### Post date: [June 23, 2014, 8:34pm UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271/1 "2014-06-23T20:34:58Z")

</div>

We have a development and production offering that uses elasticsearch. In  
development, it is not necessary to create many threads and so we're trying  
to use as few threads as possible. I've been able to make some great  
reductions using the threadpool settings, but there seems to be one that I  
can't reduce:

elasticsearch[Kubik][_http\_server\_worker_][T#16]{New I/O worker #22}

What is the "_http\_server\_worker"_ threadpool? And is there a way to reduce  
how many of them are created? Right now there are 16 of them being created  
and I don't think that many will be needed for our purposes.

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [June 23, 2014, 10:29pm UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271/2 "2014-06-23T22:29:22Z")

</div>

You can reduce netty workers by transport.netty.worker\_count setting which  
is by default set to 2 \* CPU cores

Jörg

On Mon, Jun 23, 2014 at 10:34 PM, jnortey [jeremy.nortey@gmail.com](mailto:jeremy.nortey@gmail.com) wrote:

> We have a development and production offering that uses elasticsearch. In  
> development, it is not necessary to create many threads and so we're trying  
> to use as few threads as possible. I've been able to make some great  
> reductions using the threadpool settings, but there seems to be one that I  
> can't reduce:
> 
> elasticsearch[Kubik][_http\_server\_worker_][T#16]{New I/O worker #22}
> 
> What is the "_http\_server\_worker"_ threadpool? And is there a way to  
> reduce how many of them are created? Right now there are 16 of them being  
> created and I don't think that many will be needed for our purposes.
> 
> Thanks
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGY%2BP6VaCc7kzzUPGv%2BKpUztOATHVGkOHLEoM0W\_PUuiw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGY%2BP6VaCc7kzzUPGv%2BKpUztOATHVGkOHLEoM0W_PUuiw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jnortey](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@jnortey](https://discuss.elastic.co/u/jnortey)
#### Post date: [June 24, 2014, 4:06pm UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271/3 "2014-06-24T16:06:14Z")

</div>

Perfect, that's just what I needed. Is there a comprehensive list of these  
properties? I didn't see that property mentioned here:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Monday, June 23, 2014 5:29:28 PM UTC-5, Jörg Prante wrote:

> You can reduce netty workers by transport.netty.worker\_count setting  
> which is by default set to 2 \* CPU cores
> 
> Jörg
> 
> On Mon, Jun 23, 2014 at 10:34 PM, jnortey \<[jeremy...@gmail.com](mailto:jeremy...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > We have a development and production offering that uses elasticsearch. In  
> > development, it is not necessary to create many threads and so we're trying  
> > to use as few threads as possible. I've been able to make some great  
> > reductions using the threadpool settings, but there seems to be one that I  
> > can't reduce:
> > 
> > elasticsearch[Kubik][_http\_server\_worker_][T#16]{New I/O worker #22}
> > 
> > What is the "_http\_server\_worker"_ threadpool? And is there a way to  
> > reduce how many of them are created? Right now there are 16 of them being  
> > created and I don't think that many will be needed for our purposes.
> > 
> > Thanks
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2f25f362-0cdc-46d9-914e-2bf457820528%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2f25f362-0cdc-46d9-914e-2bf457820528%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jnortey](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@jnortey](https://discuss.elastic.co/u/jnortey)
#### Post date: [June 24, 2014, 4:08pm UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271/4 "2014-06-24T16:08:15Z")

</div>

Perfect, thanks. Is there a comprehensive list of similar properties? I  
didn't find that property here:  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4f03cac4-15db-4bbd-8415-433439c866ff%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4f03cac4-15db-4bbd-8415-433439c866ff%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jnortey](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@jnortey](https://discuss.elastic.co/u/jnortey)
#### Post date: [June 24, 2014, 4:54pm UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271/5 "2014-06-24T16:54:32Z")

</div>

Hmm, setting transport.netty.worker\_count didn't work for me... For the  
record, I'm running elasticsearch through the java API, so I don't think  
I'm actually using netty. Is there another flag for this property?

On Monday, June 23, 2014 5:29:28 PM UTC-5, Jörg Prante wrote:

> You can reduce netty workers by transport.netty.worker\_count setting  
> which is by default set to 2 \* CPU cores
> 
> Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/65ba1a42-f2fa-4791-9805-e4032de51087%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/65ba1a42-f2fa-4791-9805-e4032de51087%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![coolcfan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/coolcfan/32/1336_2.png) [@coolcfan](https://discuss.elastic.co/u/coolcfan)
#### Post date: [August 15, 2014, 8:45am UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271/6 "2014-08-15T08:45:16Z")

</div>

"transport.netty.worker\_count" is for  
"org.elasticsearch.transport.netty.NettyTransport", while  
"http\_server\_works" are started by  
"org.elasticsearch.http.netty.NettyHttpServerTransport".

If a class that uses ES's componentSetting is in org.elasticsearch, the  
componentSetting takes the part between "org.elasticsearch." and  
"ClassName" as prefix.

"NettyHttpServerTransport" settings should start with "http.netty.".

So, _try "http.netty.worker\_count"_.

在 2014年6月25日星期三UTC+8上午12时54分32秒，jnortey写道：

> Hmm, setting transport.netty.worker\_count didn't work for me... For the  
> record, I'm running elasticsearch through the java API, so I don't think  
> I'm actually using netty. Is there another flag for this property?
> 
> On Monday, June 23, 2014 5:29:28 PM UTC-5, Jörg Prante wrote:
> 
> > You can reduce netty workers by transport.netty.worker\_count setting  
> > which is by default set to 2 \* CPU cores
> > 
> > Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e25a54e0-f392-46c7-bc3a-93a20d6bcbd6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e25a54e0-f392-46c7-bc3a-93a20d6bcbd6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:08am UTC](https://discuss.elastic.co/t/reduce-threads-used-by-elasticsearch/18271/7 "2017-07-06T01:08:19Z")

</div>


