How to configure heap size on 5.x installed from .deb?

I've installed Logstash-5.2.2 from the .deb file on Ubuntu 16.04

In /etc/default/logstash I have this:

LS_JAVA_OPTS="-Xms8g -Xmx8g"

And I can verify that the Logstash Java process indeed has the -Xmx8g -Xms8g options.

But if I check the memory usage, it's more like 2 GB or so. Logstash does not seem to use the amount of heap it's configured with.

With Logstash 2.x if I put LS_HEAP_SIZE="8g" in /etc/default/logstash, it would actually use 8 GB.

What's going on here? What is the "officially correct" way to define the heap size for Logstash-5.x installed from .deb?

Edit /etc/logstash/jvm.options

Nevermind. Setting LS_JAVA_OPTS in /etc/default/logstash actually grew the heap size, but it happened very slowly, over almost a couple days or so. Now memory usage is as it should be.

I will also try /etc/logstash/jvm.options when I get a chance. Thanks.

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