# Hyper-Threading

**URL:** <https://discuss.elastic.co/t/hyper-threading/18743>\
**Category:** Elasticsearch\
**Created:** [July 18, 2014, 7:57pm UTC](https://discuss.elastic.co/t/hyper-threading/18743 "2014-07-18T19:57:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 18, 2014, 7:57pm UTC](https://discuss.elastic.co/t/hyper-threading/18743/1 "2014-07-18T19:57:11Z")

</div>

Does hyper threading help Elasticsearch/Lucene? I'm looking for an answer  
like:  
Never  
Always  
Depends on workload  
Doesn't hurt

Thanks!

Nik

--  
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/CAPmjWd05Rf6\_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd05Rf6_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.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:** [July 18, 2014, 8:34pm UTC](https://discuss.elastic.co/t/hyper-threading/18743/2 "2014-07-18T20:34:52Z")

</div>

Always.

Elasticsearch makes heavy use of threading. A Java thread must be mapped to  
an execution pipeline in the CPU. The more Java threads an application  
creates, the more resources the CPU must provide. The "hyperthreading"  
feature of Intel CPUs is a core with two execution pipelines instead of  
one. So, for thread pooling, it helps to manage Java threading more  
efficiently. (In reality, it also depends on the compiler that was used for  
building the JVM, if the compiler can not exploit the power of CPU features  
like hyperthreading, it is useless for Java)

Jörg

On Fri, Jul 18, 2014 at 9:57 PM, Nikolas Everett [nik9000@gmail.com](mailto:nik9000@gmail.com) wrote:

> Does hyper threading help Elasticsearch/Lucene? I'm looking for an answer  
> like:  
> Never  
> Always  
> Depends on workload  
> Doesn't hurt
> 
> Thanks!
> 
> Nik
> 
> --  
> 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/CAPmjWd05Rf6\_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd05Rf6_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd05Rf6\_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd05Rf6_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.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/CAKdsXoFX26bXqRbTEK6mQ%2BLLuB1ELkGNSTO5O9cXfUrXc9UBNQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFX26bXqRbTEK6mQ%2BLLuB1ELkGNSTO5O9cXfUrXc9UBNQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [July 20, 2014, 10:01am UTC](https://discuss.elastic.co/t/hyper-threading/18743/3 "2014-07-20T10:01:02Z")

</div>

It would also depends on the caching abilities and that the currently  
paralelized threads are not sharing a resource. In the end, like with all  
Computer Science stuff, the answer is "it depends" 🙂

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
Author of RavenDB in Action [http://manning.com/synhershko/](http://manning.com/synhershko/)

On Fri, Jul 18, 2014 at 11:34 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
[joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:

> Always.
> 
> Elasticsearch makes heavy use of threading. A Java thread must be mapped  
> to an execution pipeline in the CPU. The more Java threads an application  
> creates, the more resources the CPU must provide. The "hyperthreading"  
> feature of Intel CPUs is a core with two execution pipelines instead of  
> one. So, for thread pooling, it helps to manage Java threading more  
> efficiently. (In reality, it also depends on the compiler that was used for  
> building the JVM, if the compiler can not exploit the power of CPU features  
> like hyperthreading, it is useless for Java)
> 
> Jörg
> 
> On Fri, Jul 18, 2014 at 9:57 PM, Nikolas Everett [nik9000@gmail.com](mailto:nik9000@gmail.com)  
> wrote:
> 
> > Does hyper threading help Elasticsearch/Lucene? I'm looking for an  
> > answer like:  
> > Never  
> > Always  
> > Depends on workload  
> > Doesn't hurt
> > 
> > Thanks!
> > 
> > Nik
> > 
> > --  
> > 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/CAPmjWd05Rf6\_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd05Rf6_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd05Rf6\_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd05Rf6_fJfz8YohXRvJNmREtCx6wGwikYdgHobqJMfKPA%40mail.gmail.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/CAKdsXoFX26bXqRbTEK6mQ%2BLLuB1ELkGNSTO5O9cXfUrXc9UBNQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFX26bXqRbTEK6mQ%2BLLuB1ELkGNSTO5O9cXfUrXc9UBNQ%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFX26bXqRbTEK6mQ%2BLLuB1ELkGNSTO5O9cXfUrXc9UBNQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFX26bXqRbTEK6mQ%2BLLuB1ELkGNSTO5O9cXfUrXc9UBNQ%40mail.gmail.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/CAHTr4ZuE0QsaGOcwvUS13%2B\_nZfk%2BD6Y%2BeQcnC6%3D-YMo3x8v5Qw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZuE0QsaGOcwvUS13%2B_nZfk%2BD6Y%2BeQcnC6%3D-YMo3x8v5Qw%40mail.gmail.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:14am UTC](https://discuss.elastic.co/t/hyper-threading/18743/4 "2017-07-06T01:14:41Z")

</div>


