# Can I set Xms or Xmx on logstash 5.2.2?

**URL:** https://discuss.elastic.co/t/can-i-set-xms-or-xmx-on-logstash-5-2-2/79202
**Category:** Logstash
**Created:** [March 20, 2017, 6:29am UTC](https://discuss.elastic.co/t/can-i-set-xms-or-xmx-on-logstash-5-2-2/79202 "2017-03-20T06:29:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MattYoon](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@MattYoon](https://discuss.elastic.co/u/MattYoon)
#### Post date: [March 20, 2017, 6:29am UTC](https://discuss.elastic.co/t/can-i-set-xms-or-xmx-on-logstash-5-2-2/79202/1 "2017-03-20T06:29:24Z")

</div>

Hi~,  
I'm using Logstash 5.2.2.  
I edited jvm.option (-Xms256m -Xmx256m)  
but Logstash started with 1G Maximum Java Heap Size  
(I monitored with Java Mission Control)  
Was I wrong..?

In addition, this is my start command.

> .\bin\logstash.bat -f config\logstash.conf

Thanks!

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [March 20, 2017, 3:05pm UTC](https://discuss.elastic.co/t/can-i-set-xms-or-xmx-on-logstash-5-2-2/79202/2 "2017-03-20T15:05:48Z")

</div>

`jvm.options` is only used by Unix-like systems. Windows JVM settings can be changed in the `setup.bat` file.

---

<div class="post-metadata">

### Author: ![MattYoon](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@MattYoon](https://discuss.elastic.co/u/MattYoon)
#### Post date: [March 21, 2017, 3:27am UTC](https://discuss.elastic.co/t/can-i-set-xms-or-xmx-on-logstash-5-2-2/79202/3 "2017-03-21T03:27:24Z")

</div>

oops,, Thank you!  
I forgot to attach my environment.

OS : Windows Server 8002 R2 Standard(64bit, S1)  
RAM : 4.00GB

So, I edited setup.bat file

if "%LS\_HEAP\_SIZE%" == "" (  
set LS\_HEAP\_SIZE=1g  
)

to

if "%LS\_HEAP\_SIZE%" == "" (  
set LS\_HEAP\_SIZE=256m  
)

In my local PC, It works great.  
but In Windows Server, It dosen't work

I guess,,  
because this server is on the virtual environment, it works bad.

Thanks theuntergeek!

---

<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: [April 18, 2017, 3:27am UTC](https://discuss.elastic.co/t/can-i-set-xms-or-xmx-on-logstash-5-2-2/79202/4 "2017-04-18T03:27:37Z")

</div>

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