# Local(true) when running embedded

**URL:** <https://discuss.elastic.co/t/local-true-when-running-embedded/10677>\
**Category:** Elasticsearch\
**Created:** [February 9, 2013, 6:37am UTC](https://discuss.elastic.co/t/local-true-when-running-embedded/10677 "2013-02-09T06:37:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Bush](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@John\_Bush](https://discuss.elastic.co/u/John_Bush)\
**Post date:** [February 9, 2013, 6:37am UTC](https://discuss.elastic.co/t/local-true-when-running-embedded/10677/1 "2013-02-09T06:37:17Z")

</div>

I'm starting some performance tests comparing our old lucene only impl to  
an embedded elasticsearch impl. In my first test using just one node, I'm  
seeing ES perform much slower than our old impl. I'm wondering if perhaps  
setting local(true) when you have only one node would give better results.  
I'm assuming there would be perhaps less overhead this way. I do plan on  
running some tests in a cluster, and expect much better results, but just  
trying to get a feel for in single node situations if maybe local(true)  
is preferred.

node = nodeBuilder()  
.settings(settings)  
.data(true).local(true).node();

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 12, 2013, 10:45pm UTC](https://discuss.elastic.co/t/local-true-when-running-embedded/10677/2 "2013-02-12T22:45:42Z")

</div>

Setting local(true) on a single embedded node will not make a difference assuming you are using the node.client(). ES will not go over the network, if an API needs to be executed on the node it was "on".

On Feb 9, 2013, at 7:37 AM, John Bush [jbush@rsmart.com](mailto:jbush@rsmart.com) wrote:

> I'm starting some performance tests comparing our old lucene only impl to an embedded elasticsearch impl. In my first test using just one node, I'm seeing ES perform much slower than our old impl. I'm wondering if perhaps setting local(true) when you have only one node would give better results. I'm assuming there would be perhaps less overhead this way. I do plan on running some tests in a cluster, and expect much better results, but just trying to get a feel for in single node situations if maybe local(true) is preferred.
> 
> node = nodeBuilder()  
> .settings(settings)  
> .data(true).local(true).node();
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![John\_Bush\_2](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@John\_Bush\_2](https://discuss.elastic.co/u/John_Bush_2)\
**Post date:** [February 12, 2013, 11:07pm UTC](https://discuss.elastic.co/t/local-true-when-running-embedded/10677/3 "2013-02-12T23:07:56Z")

</div>

thanks, what you are saying is consistent with my testing. I was  
hoping that was the case.

On Tue, Feb 12, 2013 at 3:45 PM, [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Setting local(true) on a single embedded node will not make a difference  
> assuming you are using the node.client(). ES will not go over the network,  
> if an API needs to be executed on the node it was "on".
> 
> On Feb 9, 2013, at 7:37 AM, John Bush [jbush@rsmart.com](mailto:jbush@rsmart.com) wrote:
> 
> I'm starting some performance tests comparing our old lucene only impl to an  
> embedded elasticsearch impl. In my first test using just one node, I'm  
> seeing ES perform much slower than our old impl. I'm wondering if perhaps  
> setting local(true) when you have only one node would give better results.  
> I'm assuming there would be perhaps less overhead this way. I do plan on  
> running some tests in a cluster, and expect much better results, but just  
> trying to get a feel for in single node situations if maybe local(true) is  
> preferred.
> 
> node = nodeBuilder()  
> .settings(settings)  
> .data(true).local(true).node();
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
John Bush  
602-490-0470

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_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:** [July 6, 2017, 2:51am UTC](https://discuss.elastic.co/t/local-true-when-running-embedded/10677/4 "2017-07-06T02:51:47Z")

</div>


