[AAI] Make AAI helm3 compatible
[oom.git] / kubernetes / aai / components / aai-elasticsearch / resources / config / jvm.options
1 {{/*
2 # Copyright © 2018 Amdocs, AT&T, Bell Canada
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 ## JVM configuration
17
18 ################################################################
19 ## IMPORTANT: JVM heap size
20 ################################################################
21 ##
22 ## You should always set the min and max JVM heap
23 ## size to the same value. For example, to set
24 ## the heap to 4 GB, set:
25 ##
26 ## -Xms4g
27 ## -Xmx4g
28 ##
29 ## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
30 ## for more information
31 ##
32 ################################################################
33
34 # Xms represents the initial size of total heap space
35 # Xmx represents the maximum size of total heap space
36 */}}
37 -Xms1g
38 -Xmx1g
39
40 {{/*
41 ################################################################
42 ## Expert settings
43 ################################################################
44 ##
45 ## All settings below this section are considered
46 ## expert settings. Don't tamper with them unless
47 ## you understand what you are doing
48 ##
49 ################################################################
50
51 ## GC configuration
52 */}}
53 -XX:+UseConcMarkSweepGC
54 -XX:CMSInitiatingOccupancyFraction=75
55 -XX:+UseCMSInitiatingOccupancyOnly
56
57 ## optimizations
58
59 # pre-touch memory pages used by the JVM during initialization
60 -XX:+AlwaysPreTouch
61
62 ## basic
63
64 # force the server VM
65 -server
66
67 # explicitly set the stack size
68 -Xss1m
69
70 # set to headless, just in case
71 -Djava.awt.headless=true
72
73 # ensure UTF-8 encoding by default (e.g. filenames)
74 -Dfile.encoding=UTF-8
75
76 # use our provided JNA always versus the system one
77 -Djna.nosys=true
78
79 # turn off a JDK optimization that throws away stack traces for common
80 # exceptions because stack traces are important for debugging
81 -XX:-OmitStackTraceInFastThrow
82
83 # flags to configure Netty
84 -Dio.netty.noUnsafe=true
85 -Dio.netty.noKeySetOptimization=true
86 -Dio.netty.recycler.maxCapacityPerThread=0
87
88 # log4j 2
89 -Dlog4j.shutdownHookEnabled=false
90 -Dlog4j2.disable.jmx=true
91
92 ## heap dumps
93
94 # generate a heap dump when an allocation from the Java heap fails
95 # heap dumps are created in the working directory of the JVM
96 -XX:+HeapDumpOnOutOfMemoryError
97
98 {{/*
99 # specify an alternative path for heap dumps
100 # ensure the directory exists and has sufficient space
101 #-XX:HeapDumpPath=/heap/dump/path
102
103 ## GC logging
104
105 #-XX:+PrintGCDetails
106 #-XX:+PrintGCTimeStamps
107 #-XX:+PrintGCDateStamps
108 #-XX:+PrintClassHistogram
109 #-XX:+PrintTenuringDistribution
110 #-XX:+PrintGCApplicationStoppedTime
111
112 # log GC status to a file with time stamps
113 # ensure the directory exists
114 #-Xloggc:${loggc}
115
116 # By default, the GC log file will not rotate.
117 # By uncommenting the lines below, the GC log file
118 # will be rotated every 128MB at most 32 times.
119 #-XX:+UseGCLogFileRotation
120 #-XX:NumberOfGCLogFiles=32
121 #-XX:GCLogFileSize=128M
122 */}}