# Setting GC for ES

**URL:** <https://discuss.elastic.co/t/setting-gc-for-es/15814>\
**Category:** Elasticsearch\
**Created:** [February 14, 2014, 7:33pm UTC](https://discuss.elastic.co/t/setting-gc-for-es/15814 "2014-02-14T19:33:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 14, 2014, 7:33pm UTC](https://discuss.elastic.co/t/setting-gc-for-es/15814/1 "2014-02-14T19:33:52Z")

</div>

I'm a little clueless when it comes to java options in ES, and was  
wondering where I define things like GC? I did try setting it in  
ES\_JAVA\_OPTS under /etc/default/elasticsearch, however when I did ES  
wouldn't start, so either my syntax is wrong, or something else.

Can anyone provide a few pointers for me?

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

--  
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/CAEM624b7g4YwRDfeHU1OJG9FBHmGO6Zt1UK%3DTd67Wx9K%2BhKq5g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624b7g4YwRDfeHU1OJG9FBHmGO6Zt1UK%3DTd67Wx9K%2BhKq5g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 14, 2014, 8:58pm UTC](https://discuss.elastic.co/t/setting-gc-for-es/15814/2 "2014-02-14T20:58:28Z")

</div>

FWIW I hack bin/elasticsearch.in.sh for modifying the JAVA\_OPTS there.

Jörg

On Fri, Feb 14, 2014 at 8:33 PM, Mark Walkom [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)wrote:

> I'm a little clueless when it comes to java options in ES, and was  
> wondering where I define things like GC? I did try setting it in  
> ES\_JAVA\_OPTS under /etc/default/elasticsearch, however when I did ES  
> wouldn't start, so either my syntax is wrong, or something else.
> 
> Can anyone provide a few pointers for me?
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> --  
> 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/CAEM624b7g4YwRDfeHU1OJG9FBHmGO6Zt1UK%3DTd67Wx9K%2BhKq5g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624b7g4YwRDfeHU1OJG9FBHmGO6Zt1UK%3DTd67Wx9K%2BhKq5g%40mail.gmail.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHbHyRGFRWN%3DCkyf1TYJZ7SUs0qrfyBfNFJH5m1bSD1kg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHbHyRGFRWN%3DCkyf1TYJZ7SUs0qrfyBfNFJH5m1bSD1kg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@Binh\_Ly](https://discuss.elastic.co/u/Binh_Ly)\
**Post date:** [February 14, 2014, 9:07pm UTC](https://discuss.elastic.co/t/setting-gc-for-es/15814/3 "2014-02-14T21:07:12Z")

</div>

^^ Same. For the package install, it's under  
/usr/share/elasticsearch/bin/elasticsearch.in.sh.

--  
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/9fb3060d-c78a-4f08-be55-da99b275e748%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9fb3060d-c78a-4f08-be55-da99b275e748%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 15, 2014, 5:52am UTC](https://discuss.elastic.co/t/setting-gc-for-es/15814/4 "2014-02-15T05:52:49Z")

</div>

Ok thanks, is it as simple as XX:+UseG1GC?

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 15 February 2014 08:07, Binh Ly [binh@hibalo.com](mailto:binh@hibalo.com) wrote:

> ^^ Same. For the package install, it's under /usr/share/elasticsearch/bin/  
> elasticsearch.in.sh.
> 
> --  
> 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/9fb3060d-c78a-4f08-be55-da99b275e748%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9fb3060d-c78a-4f08-be55-da99b275e748%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624Zo%3Dd8MbUe71%2BpA4ii%3DaHC9hfYV4DgL462tnF5ZgoMzzQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624Zo%3Dd8MbUe71%2BpA4ii%3DaHC9hfYV4DgL462tnF5ZgoMzzQ%40mail.gmail.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, 1:49am UTC](https://discuss.elastic.co/t/setting-gc-for-es/15814/5 "2017-07-06T01:49:53Z")

</div>


