# 64bit OSes and VM sizes

**URL:** https://discuss.elastic.co/t/64bit-oses-and-vm-sizes/4655
**Category:** Elasticsearch
**Created:** [June 18, 2011, 3:45pm UTC](https://discuss.elastic.co/t/64bit-oses-and-vm-sizes/4655 "2011-06-18T15:45:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)
#### Post date: [June 18, 2011, 3:45pm UTC](https://discuss.elastic.co/t/64bit-oses-and-vm-sizes/4655/1 "2011-06-18T15:45:32Z")

</div>

Hi,

I've been getting the following error when I set "ES\_MAX\_MEM=4g" in  
elasticsearch.in.sh:

```
                   Invalid maximum heap size: -Xmx4g

                   The specified size exceeds the maximum

```

representable size.

Can I check, that the elastic search startup scripts support 64bit  
mode "out of the box" without me putting "-d64" or "-server" in any of  
the JAVA\_OPTS in the script?

Its possible that this could be due to a config setting on our  
corporate VMs, even though we appear to have 48gigs of VM free, but I  
wanted to make sure that I didn't have to start fiddling with the  
default settings in the script.

Best Regards,

David.

---

<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: [June 18, 2011, 6:11pm UTC](https://discuss.elastic.co/t/64bit-oses-and-vm-sizes/4655/2 "2011-06-18T18:11:35Z")

</div>

You can pass custom scripts using ES\_JAVA\_OPTS, and force a 64bit VM. It really depends on installation of the JVM and what it defaults to. By default, ES will use `which java` if no JAVA\_HOME is set to get the java version, and use it as is.

On Saturday, June 18, 2011 at 6:45 PM, davrob2 wrote:

> Hi,
> 
> I've been getting the following error when I set "ES\_MAX\_MEM=4g" in  
> elasticsearch.in.sh ([http://elasticsearch.in.sh](http://elasticsearch.in.sh)):
> 
> Invalid maximum heap size: -Xmx4g
> 
> The specified size exceeds the maximum  
> representable size.
> 
> Can I check, that the Elasticsearch startup scripts support 64bit  
> mode "out of the box" without me putting "-d64" or "-server" in any of  
> the JAVA\_OPTS in the script?
> 
> Its possible that this could be due to a config setting on our  
> corporate VMs, even though we appear to have 48gigs of VM free, but I  
> wanted to make sure that I didn't have to start fiddling with the  
> default settings in the script.
> 
> Best Regards,
> 
> David.

---

<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, 4:03am UTC](https://discuss.elastic.co/t/64bit-oses-and-vm-sizes/4655/3 "2017-07-06T04:03:11Z")

</div>


