Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

How to set LS_HEAP_SIZE? #27

Closed
pvledoux opened this issue Apr 24, 2017 · 4 comments
Closed

How to set LS_HEAP_SIZE? #27

pvledoux opened this issue Apr 24, 2017 · 4 comments

Comments

@pvledoux
Copy link

In docker-compose.yml, I tried

environment:
  - "LS_HEAP_SIZE=3g"

But I still have 1g in the status of Logstash:

{
  "version": "5.3.0",
  "http_address": "0.0.0.0:9600",
  "jvm": {
    "pid": 1,
    "version": "1.8.0_121",
    "vm_name": "OpenJDK 64-Bit Server VM",
    "vm_version": "1.8.0_121",
    "vm_vendor": "Oracle Corporation",
    "start_time_in_millis": 1493031633901,
    "mem": {
      "heap_init_in_bytes": 268435456,
      "heap_max_in_bytes": 1037959168,
      "non_heap_init_in_bytes": 2555904,
      "non_heap_max_in_bytes": 0
    },
    "gc_collectors": [
      "ParNew",
      "ConcurrentMarkSweep"
    ]
  }
}
@ghost
Copy link

ghost commented Apr 26, 2017

Looking at the current implementation, it seems that specific JVM options like LS_HEAP_SIZE have been dropped in favour of the generic LS_JAVA_OPTS, which allows passing arbitrary arguments to the JVM. As a result, this will work in docker-compose.yml:

  environment:
        - LS_JAVA_OPTS=-Xmx3g
$ curl -s localhost:9600/_node/jvm | jq .jvm.mem.heap_max_in_bytes
3186360320

@pvledoux
Copy link
Author

It works, thanks!

@CpuID
Copy link

CpuID commented Nov 14, 2017

Note this does not work as of 5.6.4.

@cafuego
Copy link

cafuego commented Feb 1, 2018

Setting LS_JAVA_OPTS works fine in 5.6.5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants