Version 4.1 by michelk on 2021/09/09 18:02

Show last authors
1 The JVM can be configured with a larger heap with the -Xmx options (see oracle docs below). ISymphony allows you to configure any -X option in the jvm.args located in the root of the iSymphony installation directory (default: /opt/isymphony3/server/).
2
3 {{code title="Prepending heap option" linenumbers="true"}}
4 -Xmx6g
5 -Xms256m
6 ...
7 -XX:MinHeapFreeRatio=30
8 -XX:MaxHeapFreeRatio=50
9 -XX:-OmitStackTraceInFastThrow
10 -Dcom.sun.management.jmxremote.port=8000
11 -Dcom.sun.management.jmxremote.authenticate=false
12 -Dcom.sun.management.jmxremote.ssl=false
13 {{/code}}
14
15
16
17
18
19
20
21 (% style="margin-left: 30.0px;" %)
22
23
24 ----
25
26 (% style="margin-left: 30.0px;" %)
27
28
29 Oracle JRockit Documentation
30
31 From: [[https:~~/~~/docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html>>url:https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html||shape="rect"]]
32
33 (% class="pHeading1" style="margin-left: 30.0px;" %)
34 == -Xmx ==
35
36 (% class="pBody" style="margin-left: 30.0px;" %)
37 {{id name="wp1020405"/}}This option sets the maximum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection. Depending upon the kind of operating system you are running, the maximum value you can set for the Java heap can vary.
38
39 (% style="margin-left: 60.0px;" %)
40 {{id name="wp1022691"/}}
41
42 (% style="margin-left: 54.0px;" %)
43 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
44 (((
45 **Note:**
46 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
47 (((
48 -Xmx (% class="cEmphasis" %)//does not//(%%) limit the total amount of memory that the JVM can use.
49 )))
50
51 (% class="pHeading2" style="margin-left: 54.0px;" %)
52 === {{id name="wp1000524"/}}Operation ===
53
54 (% class="pBody" style="margin-left: 30.0px;" %)
55 {{id name="wp1014710"/}}Format: -Xmx<size>[g|G|m|M|k|K]
56
57 (% class="pBody" style="margin-left: 30.0px;" %)
58 {{id name="wp1009219"/}}Combine -Xmx with a memory value
59
60 (% class="pBody" style="margin-left: 30.0px;" %)
61 {{id name="wp1029002"/}}For Example:
62
63 (% class="pBody" style="margin-left: 30.0px;" %)
64 {{id name="wp1028872"/}}java -Xmx:1g myApp
65
66 (% class="pBody" style="margin-left: 30.0px;" %)
67 {{id name="wp1028873"/}}sets the maximum java heap to 1 gigabyte.
68
69 (% class="pBody" style="margin-left: 30.0px;" %)
70 {{id name="wp1014723"/}}If you do not add a unit, you will get the exact value you state; for example, 64 will be interpreted as 64 bytes, not 64 megabytes or 64 kilobytes.
71
72 (% class="pBody" style="margin-left: 30.0px;" %)
73 {{id name="wp1020436"/}}The -Xmx option and -Xms option in combination are used to limit the Java heap size. The Java heap can never grow larger than -Xmx. Also, the -Xms value can be used as “minimum heap size” to set a fixed heap size by setting -Xms = -Xmx when, for example, you want to run benchmark tests.
74
75 (% class="pHeading3" style="margin-left: 54.0px;" %)
76 ==== {{id name="wp1025073"/}}Known Issue for Linux Users ====
77
78 (% class="pBody" style="margin-left: 30.0px;" %)
79 {{id name="wp1025053"/}}The JRockit JVM R26.0.0 on Linux IA32 can experience problems setting up memory for object allocation. When this happens, you will receive the following message:
80
81 (% style="margin-left: 60.0px;" %)
82 {{id name="wp1025054"/}}
83
84 (% class="pPreformatted" style="margin-left: 30.0px;" %)
85 (((
86
87 \\
88
89 {{{[JRockit] ERROR: Fatal error in JRockit during memory setup phase. Try to reduce the heap size using -Xmx:&#x3c;size&#x3e;m, i.e. “-Xmx:16m”. Could not create the Java virtual machine.}}}
90 )))
91
92 (% class="pBody" style="margin-left: 30.0px;" %)
93 {{id name="wp1025082"/}}and JRockit JVM will be exited.
94
95 (% class="pBody" style="margin-left: 30.0px;" %)
96 {{id name="wp1025055"/}}The workaround for this situation is to try different -Xmx values until you find a heap size that is setup correct.
97
98 (% style="margin-left: 60.0px;" %)
99 {{id name="wp1025057"/}}
100
101 (% style="margin-left: 54.0px;" %)
102 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
103 (((
104 **Note:**
105 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
106 (((
107 This known issue is valid for R26.0.0.
108 )))
109
110 (% class="pHeading2" style="margin-left: 54.0px;" %)
111 === {{id name="wp1020437"/}}Default Value ===
112
113 (% class="pBody" style="margin-left: 30.0px;" %)
114 {{id name="wp1012405"/}}If you do not set this, the maximum java heap size depends on the platform and the amount of memory in the system as described in [[Table 2-6>>url:https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html#wp1035652||shape="rect"]].
115
116 (% align="left" style="margin-left: 30.0px;" %)
117 (((
118
119
120 (% style="margin-left: 54.0px;" %)
121 {{id name="wp1035652"/}}(% style="margin-left: 30.0px;" %)|=(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
122 (((
123 (% class="pCellHeading" style="text-align: left;margin-left: 30.0px;" %)
124 (((
125 {{id name="wp1035658"/}}Release
126 )))
127 )))|=(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
128 (((
129 (% class="pCellHeading" style="text-align: left;margin-left: 30.0px;" %)
130 (((
131 {{id name="wp1035660"/}}Platform
132 )))
133 )))|=(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
134 (((
135 (% class="pCellHeading" style="text-align: left;margin-left: 30.0px;" %)
136 (((
137 {{id name="wp1035662"/}}Default Maximum Heap Size
138 )))
139 )))
140 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
141 (((
142 (% class="pCellBody" style="margin-left: 30.0px;" %)
143 (((
144 {{id name="wp1035664"/}}R27.2 and older
145 )))
146 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
147 (((
148 (% class="pCellBody" style="margin-left: 30.0px;" %)
149 (((
150 {{id name="wp1035666"/}}Windows
151 )))
152 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
153 (((
154 (% class="pCellBody" style="margin-left: 30.0px;" %)
155 (((
156 {{id name="wp1035668"/}}75% of total physical memory up to 1 GB
157 )))
158 )))
159 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
160 (((
161 (% class="pCellBody" style="margin-left: 30.0px;" %)
162 (((
163 {{id name="wp1035670"/}}R27.2 and older
164 )))
165 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
166 (((
167 (% class="pCellBody" style="margin-left: 30.0px;" %)
168 (((
169 {{id name="wp1035672"/}}Linux, Solaris
170 )))
171 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
172 (((
173 (% class="pCellBody" style="margin-left: 30.0px;" %)
174 (((
175 {{id name="wp1035674"/}}50% of available physical memory up to 1 GB
176 )))
177 )))
178 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
179 (((
180 (% class="pCellBody" style="margin-left: 30.0px;" %)
181 (((
182 {{id name="wp1035676"/}}R27.3 and newer
183 )))
184 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
185 (((
186 (% class="pCellBody" style="margin-left: 30.0px;" %)
187 (((
188 {{id name="wp1035678"/}}Windows on a 64 bit platform
189 )))
190 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
191 (((
192 (% class="pCellBody" style="margin-left: 30.0px;" %)
193 (((
194 {{id name="wp1035680"/}}75% of total physical memory up to 2 GB
195 )))
196 )))
197 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
198 (((
199 (% class="pCellBody" style="margin-left: 30.0px;" %)
200 (((
201 {{id name="wp1035682"/}}R27.3 and newer
202 )))
203 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
204 (((
205 (% class="pCellBody" style="margin-left: 30.0px;" %)
206 (((
207 {{id name="wp1035684"/}}Linux or Solaris on a 64 bit platform
208 )))
209 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
210 (((
211 (% class="pCellBody" style="margin-left: 30.0px;" %)
212 (((
213 {{id name="wp1035686"/}}50% of available physical memory up to 2 GB
214 )))
215 )))
216 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
217 (((
218 (% class="pCellBody" style="margin-left: 30.0px;" %)
219 (((
220 {{id name="wp1035700"/}}R72.3 and newer
221 )))
222 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
223 (((
224 (% class="pCellBody" style="margin-left: 30.0px;" %)
225 (((
226 {{id name="wp1035702"/}}Windows on a 32 bit platform
227 )))
228 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
229 (((
230 (% class="pCellBody" style="margin-left: 30.0px;" %)
231 (((
232 {{id name="wp1035704"/}}75% of total physical memory up to 1 GB
233 )))
234 )))
235 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
236 (((
237 (% class="pCellBody" style="margin-left: 30.0px;" %)
238 (((
239 {{id name="wp1035694"/}}R27.3 and newer
240 )))
241 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
242 (((
243 (% class="pCellBody" style="margin-left: 30.0px;" %)
244 (((
245 {{id name="wp1035696"/}}Linux on a 32 bit platform
246 )))
247 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
248 (((
249 (% class="pCellBody" style="margin-left: 30.0px;" %)
250 (((
251 {{id name="wp1035698"/}}50% of available physical memory up to 1 GB
252 )))
253 )))
254
255
256 )))
257
258 (% class="pBody" %)
259
260
261 (% class="pHeading2" style="margin-left: 54.0px;" %)
262 === {{id name="wp1027832"/}}Flags or Other Options Affected ===
263
264 (% class="pBody" style="margin-left: 30.0px;" %)
265 {{id name="wp1014694"/}}None.
266
267 (% class="pHeading2" style="margin-left: 54.0px;" %)
268 === {{id name="wp1010574"/}}Exceptions ===
269
270 (% class="pBody" style="margin-left: 30.0px;" %)
271 {{id name="wp1029250"/}}When using-Xmx, be aware of the following exceptions:
272
273 (% class="pSmartList1Bullet" style="margin-left: 30.0px;" %)
274 (((
275 *
276 ** {{id name="wp1029262"/}}If both -Xmx and [[-Xms>>url:https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html#wp999527||shape="rect"]] are specified the value of -Xmx must be larger than or equal to that of -Xms.
277 ** {{id name="wp1029252"/}}If both -Xmx and [[-Xns>>url:https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html#wp999534||shape="rect"]] are specified the value of -Xmx must be larger than or equal to that of -Xns.
278 ** {{id name="wp1029254"/}}The minimum value for -Xmx is 16 MB.
279 )))