Skip to content

Commit

Permalink
Resolve performance degredation when we went to OpenSearch 1.3 by usi…
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Apr 27, 2022
1 parent ad19730 commit 87da2cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Dockerfiles/opensearch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ RUN yum install -y openssl util-linux procps && \
/usr/share/opensearch/bin/opensearch-plugin remove opensearch-security --purge && \
/usr/share/opensearch/bin/opensearch-plugin remove opensearch-performance-analyzer --purge && \
echo -e 'cluster.name: "docker-cluster"\nnetwork.host: 0.0.0.0\ncompatibility.override_main_response_version: true\nbootstrap.memory_lock: true' > /usr/share/opensearch/config/opensearch.yml && \
sed -i "s/#[[:space:]]*\([0-9]*-[0-9]*:-XX:-\(UseConcMarkSweepGC\|UseCMSInitiatingOccupancyOnly\)\)/\1/" /usr/share/opensearch/config/jvm.options && \
sed -i "s/^[0-9][0-9]*\(-:-XX:\(+UseG1GC\|G1ReservePercent\|InitiatingHeapOccupancyPercent\)\)/$($JAVA_HOME/bin/java -version 2>&1 | grep version | awk '{print $3}' | tr -d '\"' | cut -d. -f1)\1/" /usr/share/opensearch/config/jvm.options && \
chown -R $PUSER:$PGROUP /usr/share/opensearch/config/opensearch.yml && \
sed -i "s/^\([[:space:]]*\)\(performance-analyzer-agent-cli\)/\1# \2/" /usr/share/opensearch/opensearch-docker-entrypoint.sh && \
sed -i '/[^#].*OPENSEARCH_HOME\/bin\/opensearch.*/i /usr/local/bin/jdk-cacerts-auto-import.sh || true' /usr/share/opensearch/opensearch-docker-entrypoint.sh
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ services:
logger.level : 'WARN'
bootstrap.memory_lock : 'true'
MAX_LOCKED_MEMORY : 'unlimited'
OPENSEARCH_JAVA_OPTS : '-Xms4g -Xmx4g -Xss256k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
OPENSEARCH_JAVA_OPTS : '-server -Xms4g -Xmx4g -Xss256k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
VIRTUAL_HOST : 'os.malcolm.local'
discovery.type : 'single-node'
discovery.zen.minimum_master_nodes : 1
Expand Down Expand Up @@ -252,7 +252,7 @@ services:
<< : *common-beats-variables
<< : *common-lookup-variables
OS_HOSTS : 'opensearch:9200'
LS_JAVA_OPTS : '-Xms2g -Xmx2g -Xss1536k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
LS_JAVA_OPTS : '-server -Xms2g -Xmx2g -Xss1536k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
depends_on:
- opensearch
expose:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ services:
logger.level : 'INFO'
bootstrap.memory_lock : 'true'
MAX_LOCKED_MEMORY : 'unlimited'
OPENSEARCH_JAVA_OPTS : '-Xms4g -Xmx4g -Xss256k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
OPENSEARCH_JAVA_OPTS : '-server -Xms4g -Xmx4g -Xss256k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
VIRTUAL_HOST : 'os.malcolm.local'
discovery.type : 'single-node'
discovery.zen.minimum_master_nodes : 1
Expand Down Expand Up @@ -264,7 +264,7 @@ services:
<< : *common-beats-variables
<< : *common-lookup-variables
OS_HOSTS : 'opensearch:9200'
LS_JAVA_OPTS : '-Xms2g -Xmx2g -Xss1536k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
LS_JAVA_OPTS : '-server -Xms2g -Xmx2g -Xss1536k -XX:-HeapDumpOnOutOfMemoryError -Djava.security.egd=file:/dev/./urandom -Dlog4j.formatMsgNoLookups=true'
depends_on:
- opensearch
expose:
Expand Down

0 comments on commit 87da2cb

Please sign in to comment.