Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3913755
D2459.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D2459.diff
View Options
diff --git a/pillar/opensearch/clusters.sls b/pillar/opensearch/clusters.sls
--- a/pillar/opensearch/clusters.sls
+++ b/pillar/opensearch/clusters.sls
@@ -16,3 +16,4 @@
users:
admin: nasqueron.opensearch.infra-logs.internal_users.admin
dashboards: nasqueron.opensearch.infra-logs.internal_users.dashboards
+ heap_size: 26G
diff --git a/roles/opensearch/opensearch/config.sls b/roles/opensearch/opensearch/config.sls
--- a/roles/opensearch/opensearch/config.sls
+++ b/roles/opensearch/opensearch/config.sls
@@ -19,6 +19,15 @@
- context:
config: {{ config }}
+/opt/opensearch/config/jvm.options:
+ file.managed:
+ - source: salt://roles/opensearch/opensearch/files/jvm.options
+ - user: opensearch
+ - group: opensearch
+ - template: jinja
+ - context:
+ heap_size: {{ config['heap_size'] }}
+
# -------------------------------------------------------------
# TLS certificates
#
diff --git a/roles/opensearch/opensearch/files/jvm.options b/roles/opensearch/opensearch/files/jvm.options
new file mode 100644
--- /dev/null
+++ b/roles/opensearch/opensearch/files/jvm.options
@@ -0,0 +1,72 @@
+# -------------------------------------------------------------
+# OpenSearch configuration - JVM
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/opensearch/opensearch/files/jvm.options
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+# -------------------------------------------------------------
+# JVM heap size
+#
+# Xms represents the initial size of total heap space
+# Xmx represents the maximum size of total heap space
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+-Xms{{ heap_size }}
+-Xmx{{ heap_size }}
+
+# -------------------------------------------------------------
+# Expert settings
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+## GC configuration
+8-13:-XX:+UseConcMarkSweepGC
+8-13:-XX:CMSInitiatingOccupancyFraction=75
+8-13:-XX:+UseCMSInitiatingOccupancyOnly
+
+## G1GC Configuration
+# NOTE: G1 GC is only supported on JDK version 10 or later
+# to use G1GC, uncomment the next two lines and update the version on the
+# following three lines to your version of the JDK
+# 10-13:-XX:-UseConcMarkSweepGC
+# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
+14-:-XX:+UseG1GC
+14-:-XX:G1ReservePercent=25
+14-:-XX:InitiatingHeapOccupancyPercent=30
+
+## JVM temporary directory
+-Djava.io.tmpdir=${OPENSEARCH_TMPDIR}
+
+## heap dumps
+
+# generate a heap dump when an allocation from the Java heap fails
+# heap dumps are created in the working directory of the JVM
+-XX:+HeapDumpOnOutOfMemoryError
+
+# specify an alternative path for heap dumps; ensure the directory exists and
+# has sufficient space
+-XX:HeapDumpPath=data
+
+# specify an alternative path for JVM fatal error logs
+-XX:ErrorFile=logs/hs_err_pid%p.log
+
+## JDK 8 GC logging
+8:-XX:+PrintGCDetails
+8:-XX:+PrintGCDateStamps
+8:-XX:+PrintTenuringDistribution
+8:-XX:+PrintGCApplicationStoppedTime
+8:-Xloggc:logs/gc.log
+8:-XX:+UseGCLogFileRotation
+8:-XX:NumberOfGCLogFiles=32
+8:-XX:GCLogFileSize=64m
+
+# JDK 9+ GC logging
+9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 11:40 (10 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2306818
Default Alt Text
D2459.diff (3 KB)
Attached To
Mode
D2459: Set OpenSearch heap size
Attached
Detach File
Event Timeline
Log In to Comment