# Elasticsearch startup, setting default heap size

**URL:** <https://discuss.elastic.co/t/elasticsearch-startup-setting-default-heap-size/34996>\
**Category:** Elasticsearch\
**Created:** [November 18, 2015, 9:26pm UTC](https://discuss.elastic.co/t/elasticsearch-startup-setting-default-heap-size/34996 "2015-11-18T21:26:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![msilearned](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@msilearned](https://discuss.elastic.co/u/msilearned)\
**Post date:** [November 18, 2015, 9:26pm UTC](https://discuss.elastic.co/t/elasticsearch-startup-setting-default-heap-size/34996/1 "2015-11-18T21:26:41Z")

</div>

New user on this forum, just started using Elasticsearch.

My question revolves around the proper way to set heap size @ startup in an automated manor.

The infrastructure in place that I've inherited does a yum install and build settings with a python script. All is good and well, but we need bump up the default heap size and I'm having problems with that setting in the startup.

Tried just setting it in bashrc, but export does not set it for the startup at the end of the script...  
Short of another script editing the default configs, is there another method that is recommended?

---

<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:** [November 18, 2015, 9:44pm UTC](https://discuss.elastic.co/t/elasticsearch-startup-setting-default-heap-size/34996/2 "2015-11-18T21:44:59Z")

</div>

> [@msilearned](#):
>
> Short of another script editing the default configs, is there another method that is recommended?

`/etc/sysconfig/elasticsearch` is the usual spot for this.

---

<div class="post-metadata">

**Author:** ![msilearned](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@msilearned](https://discuss.elastic.co/u/msilearned)\
**Post date:** [November 18, 2015, 10:44pm UTC](https://discuss.elastic.co/t/elasticsearch-startup-setting-default-heap-size/34996/3 "2015-11-18T22:44:01Z")

</div>

Thanks Nik - I guess a simple sed would work if that is the spot! Appreciate it...

---

<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:** [November 19, 2015, 12:41am UTC](https://discuss.elastic.co/t/elasticsearch-startup-setting-default-heap-size/34996/4 "2015-11-19T00:41:26Z")

</div>

Or `/etc/default/elasticsearch` on Debian based systems.

---

<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 5, 2017, 11:37pm UTC](https://discuss.elastic.co/t/elasticsearch-startup-setting-default-heap-size/34996/5 "2017-07-05T23:37:26Z")

</div>


