|
35 | 35 |
|
36 | 36 | ## optimizations
|
37 | 37 |
|
38 |
| -# disable calls to System#gc |
39 |
| --XX:+DisableExplicitGC |
40 |
| - |
41 |
| -# pre-touch memory pages used by the JVM during initialization |
42 |
| --XX:+AlwaysPreTouch |
43 |
| - |
44 |
| -## basic |
45 |
| - |
46 |
| -# force the server VM (remove on 32-bit client JVMs) |
47 |
| --server |
48 |
| - |
49 |
| -# explicitly set the stack size (reduce to 320k on 32-bit client JVMs) |
50 |
| --Xss1m |
51 |
| - |
52 |
| -# set to headless, just in case |
53 |
| --Djava.awt.headless=true |
54 |
| - |
55 | 38 | # ensure UTF-8 encoding by default (e.g. filenames)
|
56 | 39 | -Dfile.encoding=UTF-8
|
57 | 40 |
|
58 | 41 | # use our provided JNA always versus the system one
|
59 | 42 | -Djna.nosys=true
|
60 | 43 |
|
61 |
| -# use old-style file permissions on JDK9 |
62 |
| --Djdk.io.permissionsUseCanonicalPath=true |
63 |
| - |
64 |
| -# flags to configure Netty |
65 |
| --Dio.netty.noUnsafe=true |
66 |
| --Dio.netty.noKeySetOptimization=true |
67 |
| --Dio.netty.recycler.maxCapacityPerThread=0 |
68 |
| - |
69 | 44 | # log4j 2
|
70 | 45 | -Dlog4j.shutdownHookEnabled=false
|
71 | 46 | -Dlog4j2.disable.jmx=true
|
72 | 47 | -Dlog4j.skipJansi=true
|
73 | 48 |
|
74 |
| -## heap dumps |
75 |
| - |
76 |
| -# generate a heap dump when an allocation from the Java heap fails |
77 |
| -# heap dumps are created in the working directory of the JVM |
78 |
| --XX:+HeapDumpOnOutOfMemoryError |
79 |
| - |
80 |
| -# specify an alternative path for heap dumps |
81 |
| -# ensure the directory exists and has sufficient space |
82 |
| -#-XX:HeapDumpPath=${heap.dump.path} |
83 |
| - |
84 |
| -## GC logging |
85 |
| - |
86 |
| -#-XX:+PrintGCDetails |
87 |
| -#-XX:+PrintGCTimeStamps |
88 |
| -#-XX:+PrintGCDateStamps |
89 |
| -#-XX:+PrintClassHistogram |
90 |
| -#-XX:+PrintTenuringDistribution |
91 |
| -#-XX:+PrintGCApplicationStoppedTime |
92 |
| - |
93 |
| -# log GC status to a file with time stamps |
94 |
| -# ensure the directory exists |
95 |
| -#-Xloggc:${loggc} |
96 |
| - |
97 |
| -# By default, the GC log file will not rotate. |
98 |
| -# By uncommenting the lines below, the GC log file |
99 |
| -# will be rotated every 128MB at most 32 times. |
100 |
| -#-XX:+UseGCLogFileRotation |
101 |
| -#-XX:NumberOfGCLogFiles=32 |
102 |
| -#-XX:GCLogFileSize=128M |
103 |
| - |
104 |
| -# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON. |
105 |
| -# If documents were already indexed with unquoted fields in a previous version |
106 |
| -# of Elasticsearch, some operations may throw errors. |
107 |
| -# |
108 |
| -# WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided |
109 |
| -# only for migration purposes. |
110 |
| -#-Delasticsearch.json.allow_unquoted_field_names=true |
111 |
| - |
112 | 49 | <% p('elasticsearch.jvm_options').each do |opt| %><%= opt %><% end %>
|
0 commit comments