Reduce threads used by elasticsearch


(jnortey) #1

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fe2a2d17-0c85-441b-858e-57242bfa0524%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Jörg Prante) #2

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 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.
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?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGY%2BP6VaCc7kzzUPGv%2BKpUztOATHVGkOHLEoM0W_PUuiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(jnortey) #3

Perfect, that's just what I needed. Is there a comprehensive list of these
properties? I didn't see that property mentioned here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-threadpool.html

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
<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 <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?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2f25f362-0cdc-46d9-914e-2bf457820528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(jnortey) #4

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

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4f03cac4-15db-4bbd-8415-433439c866ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(jnortey) #5

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/65ba1a42-f2fa-4791-9805-e4032de51087%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(coolcfan) #6

"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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e25a54e0-f392-46c7-bc3a-93a20d6bcbd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #7