diff --git a/README.md b/README.md index d8c70f7..8f4b411 100644 --- a/README.md +++ b/README.md @@ -368,11 +368,13 @@ For example, to increase the maximum JVM Heap Size for Logstash: logstash: environment: - LS_JAVA_OPTS: -Xmx1g + LS_JAVA_OPTS: -Xms1g -Xmx1g ``` -When these options are not set, both Elasticsearch and Logstash start with an upper cap of [1/4 of the total host -memory][jvm-heap] set on the JVM Heap Size. +When these options are not set: + +* Elasticsearch starts with a JVM Heap Size that is [determined automatically][es-heap]. +* Logstash starts with a fixed JVM Heap Size of 1 GB. ### How to enable a remote JMX connection to a service @@ -416,6 +418,7 @@ See the following Wiki pages: [booststap-checks]: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html [es-sys-config]: https://www.elastic.co/guide/en/elasticsearch/reference/current/system-config.html +[es-heap]: https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#heap-size-settings [win-filesharing]: https://docs.docker.com/desktop/windows/#file-sharing [mac-filesharing]: https://docs.docker.com/desktop/mac/#file-sharing @@ -436,5 +439,3 @@ See the following Wiki pages: [ls-docker]: https://www.elastic.co/guide/en/logstash/current/docker-config.html [upgrade]: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html - -[jvm-heap]: https://docs.oracle.com/en/java/javase/18/gctuning/parallel-collector1.html#GUID-74BE3BC9-C7ED-4AF8-A202-793255C864C4 diff --git a/docker-compose.yml b/docker-compose.yml index e9e73b7..d41beb9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,7 +36,7 @@ services: - "9200:9200" - "9300:9300" environment: - ES_JAVA_OPTS: -Xmx512m + ES_JAVA_OPTS: -Xms512m -Xmx512m # Bootstrap password. # Used to initialize the keystore during the initial startup of # Elasticsearch. Ignored on subsequent runs. @@ -61,7 +61,7 @@ services: - "5000:5000/udp" - "9600:9600" environment: - LS_JAVA_OPTS: -Xmx256m + LS_JAVA_OPTS: -Xms256m -Xmx256m LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-} networks: - elk diff --git a/extensions/enterprise-search/enterprise-search-compose.yml b/extensions/enterprise-search/enterprise-search-compose.yml index 875c5b4..ad25739 100644 --- a/extensions/enterprise-search/enterprise-search-compose.yml +++ b/extensions/enterprise-search/enterprise-search-compose.yml @@ -9,7 +9,7 @@ services: volumes: - ./extensions/enterprise-search/config/enterprise-search.yml:/usr/share/enterprise-search/config/enterprise-search.yml:ro,Z environment: - JAVA_OPTS: -Xmx2g + JAVA_OPTS: -Xms2g -Xmx2g ENT_SEARCH_DEFAULT_PASSWORD: 'changeme' ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-} ports: