# When run logstash, it promts "Invalid initial heap size: -Xms5g"

**URL:** https://discuss.elastic.co/t/when-run-logstash-it-promts-invalid-initial-heap-size-xms5g/149214
**Category:** Logstash
**Created:** [September 20, 2018, 3:48am UTC](https://discuss.elastic.co/t/when-run-logstash-it-promts-invalid-initial-heap-size-xms5g/149214 "2018-09-20T03:48:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Zhao](https://avatars.discourse-cdn.com/v4/letter/z/3da27b/32.png) [@Zhao](https://discuss.elastic.co/u/Zhao)
#### Post date: [September 20, 2018, 3:48am UTC](https://discuss.elastic.co/t/when-run-logstash-it-promts-invalid-initial-heap-size-xms5g/149214/1 "2018-09-20T03:48:01Z")

</div>

As my computer has 32g memory, so I changed the jvm.options to increase the memory of logstash.  
jvm.options is  
-Xms5g  
-Xmx8g

but after change the jvm.options , it promts the belowing error when run logstash.

root@EC2-ELK-IE-PROD-2 logstash]# /usr/share/logstash/bin/logstash --path.settings=/etc/logstash -r -w 8 -b 2000 -d  
Invalid initial heap size: -Xms5g  
Error: Could not create the Java Virtual Machine.  
Error: A fatal exception has occurred. Program will exit.

When I googled, many people met this problem because of the 32bit java version.  
But my java version is already 64bits.

[root@EC2-ELK-IE-PROD-2 elasticsearch]# java -version  
openjdk version "1.8.0\_181"  
OpenJDK Runtime Environment (build 1.8.0\_181-b13)  
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

Are therre any guys can give me some advice? Thanks very much.

---

<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: [October 18, 2018, 3:48am UTC](https://discuss.elastic.co/t/when-run-logstash-it-promts-invalid-initial-heap-size-xms5g/149214/2 "2018-10-18T03:48:13Z")

</div>

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