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

setting memory parameters - docs correct? #151

Closed
@davidkarlsen

Description

@davidkarlsen
  • Docker image used: 6.2.2 from elastic.inc
  • Operating System: RHEL 7.4

The docs https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
say to set - "ES_JAVA_OPTS=-Xms512m -Xmx512m"

which I do:

elasticsearch:
    image: fsdepot.evry.com:8085/davidkarlsen/elasticsearchhq:6.2.2
    restart: always
    volumes:
      - /srv/elasticsearch/data:/usr/share/elasticsearch/data
      - /srv/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - /etc/localtime:/etc/localtime:ro
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms12g -Xmx12g"
      - SERVICE_TAGS=prom_monitored,metrics_path=/_prometheus/metrics
      - SERVICE_NAME=applog-elasticsearch
      - SERVICE_CHECK_HTTP=/
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    mem_limit: 24g
    ports:
     - "0.0.0.0:9200:9200"
    cap_add:
      - IPC_LOCK

but as you see:

!ps
ps xa|grep elast|grep Xmx
26753 ?        SLsl  23:17 /usr/lib/jvm/jre-1.8.0-openjdk/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch.yVP7xQoF -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=32 -XX:GCLogFileSize=64m -Des.cgroups.hierarchy.override=/ -Xms12g -Xmx12g -Des.path.home=/usr/share/elasticsearch -Des.path.conf=/usr/share/elasticsearch/config -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -Ebootstrap.memory_lock=true

it is confusing as it says -Xms1g -Xmx1g as well as -Xms12g -Xmx12g

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions