# Can't start ES with HEAP SIZE larger than 7g

**URL:** https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580
**Category:** Elasticsearch
**Created:** [April 17, 2017, 1:23pm UTC](https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580 "2017-04-17T13:23:43Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![carlosvega](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlosvega/32/28433_2.png) [@carlosvega](https://discuss.elastic.co/u/carlosvega)
#### Post date: [April 17, 2017, 1:23pm UTC](https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580/1 "2017-04-17T13:23:43Z")

</div>

Even though my machine has 12GB of memory available and knowing that the mlockall is true, I'm not able to start elasticsearch using a HEAP SIZE larger than 7g. Is there any configuration that I'm missing?

Thanks in advance

**Update 1:**

I get the following logs using the debug mode when I restart the service.

> [2017-04-16 15:26:33,094][DEBUG][bootstrap] seccomp(SECCOMP\_SET\_MODE\_FILTER): Function not implemented, falling back to prctl(PR\_SET\_SECCOMP)...  
> [2017-04-16 15:26:33,094][DEBUG][bootstrap] Linux seccomp filter installation successful, threads: [app]

This also happens when I put a ES\_MIN\_MEM equals to ES\_MAX\_MEM or if I use ES\_HEAP\_SIZE instead.  
My elasticsearch version is 2.3.2

**Update 2**

My kernel is 3.10.0-229 of a Centos 7, it might be related with the seccomp call but it should fall back to the other function properly.

The kernel log says:

> Out of memory: Kill process 6593 (java) score 546 or sacrifice child  
> Killed process 6593 (java) total-vm:16040776kB, anon-rss:7659632kB, file-rss:124120kB

But the machine does have enough memory.

---

<div class="post-metadata">

### Author: ![EikeD](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@EikeD](https://discuss.elastic.co/u/EikeD)
#### Post date: [April 17, 2017, 1:29pm UTC](https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580/2 "2017-04-17T13:29:53Z")

</div>

What kind of "not able to start" ? Are you getting an error upon starting? Anything usefull in the logs ?

---

<div class="post-metadata">

### Author: ![carlosvega](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlosvega/32/28433_2.png) [@carlosvega](https://discuss.elastic.co/u/carlosvega)
#### Post date: [April 17, 2017, 1:35pm UTC](https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580/3 "2017-04-17T13:35:36Z")

</div>

> What kind of "not able to start" ? Are you getting an error upon starting?

No error in the logs. It just crash after restarting the service. I changed the log level to DEBUG and got these:

I get the following logs using the debug mode.

> [2017-04-16 15:26:33,094][DEBUG][bootstrap] seccomp(SECCOMP\_SET\_MODE\_FILTER): Function not implemented, falling back to prctl(PR\_SET\_SECCOMP)...  
> [2017-04-16 15:26:33,094][DEBUG][bootstrap] Linux seccomp filter installation successful, threads: [app]

This also happens when I put a ES\_MIN\_MEM equals to ES\_MAX\_MEM or if I use ES\_HEAP\_SIZE instead.  
My elasticsearch version is 2.3.2

---

<div class="post-metadata">

### Author: ![danielmotaleite](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmotaleite/32/19796_2.png) [@danielmotaleite](https://discuss.elastic.co/u/danielmotaleite)
#### Post date: [April 17, 2017, 2:50pm UTC](https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580/4 "2017-04-17T14:50:36Z")

</div>

do you have hugepages enabled? if yes, you also need to add a flag to java, so it can use it: `-XX:+UseLargePages -XX:LargePageSizeInBytes=2m` (or whatever the size you may be using)

check your hugepages setup with cat /proc/meminfo |grep Huge  
please notice that a hugepage can not use used by nom-hugepage apps, so free will show then as free, but they can not be used

---

<div class="post-metadata">

### Author: ![carlosvega](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlosvega/32/28433_2.png) [@carlosvega](https://discuss.elastic.co/u/carlosvega)
#### Post date: [April 17, 2017, 3:23pm UTC](https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580/5 "2017-04-17T15:23:07Z")

</div>

My hugepages configurations is set to "madvise".

And the details from the meminfo are the following:

AnonHugePages: 3373056 kB  
HugePages\_Total: 0  
HugePages\_Free: 0  
HugePages\_Rsvd: 0  
HugePages\_Surp: 0  
Hugepagesize: 2048 kB

Thanks for the help

---

<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: [May 15, 2017, 3:29pm UTC](https://discuss.elastic.co/t/cant-start-es-with-heap-size-larger-than-7g/82580/6 "2017-05-15T15:29:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
