Last modified by michelk on 2021/09/09 20:55

Show last authors
1 The JVM can be configured with a larger heap with the -Xmx option (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 theme="Midnight" title="Example: Prepending heap option"}}
4 -Xmx6g
5 -Xms256m
6 -XX:MinHeapFreeRatio=30
7 -XX:MaxHeapFreeRatio=50
8 -XX:-OmitStackTraceInFastThrow
9 -Dcom.sun.management.jmxremote.port=8000
10 -Dcom.sun.management.jmxremote.authenticate=false
11 -Dcom.sun.management.jmxremote.ssl=false
12 {{/code}}
13
14
15
16
17
18
19
20 (% style="margin-left: 30.0px;" %)
21
22
23 ----
24
25 (% style="margin-left: 30.0px;" %)
26
27
28 Oracle JRockit Documentation
29
30 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"]]
31
32 (% class="pHeading1" style="margin-left: 30.0px;" %)
33 == -Xmx ==
34
35 (% class="pBody" style="margin-left: 30.0px;" %)
36 {{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.
37
38 (% style="margin-left: 60.0px;" %)
39 {{id name="wp1022691"/}}
40
41 (% style="margin-left: 54.0px;" %)
42 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
43 (((
44 **Note:**
45 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
46 (((
47 -Xmx (% class="cEmphasis" %)//does not//(%%) limit the total amount of memory that the JVM can use.
48 )))
49
50 (% class="pHeading2" style="margin-left: 54.0px;" %)
51 === {{id name="wp1000524"/}}Operation ===
52
53 (% class="pBody" style="margin-left: 30.0px;" %)
54 {{id name="wp1014710"/}}Format: -Xmx<size>[g|G|m|M|k|K]
55
56 (% class="pBody" style="margin-left: 30.0px;" %)
57 {{id name="wp1009219"/}}Combine -Xmx with a memory value
58
59 (% class="pBody" style="margin-left: 30.0px;" %)
60 {{id name="wp1029002"/}}For Example:
61
62 (% class="pBody" style="margin-left: 30.0px;" %)
63 {{id name="wp1028872"/}}java -Xmx:1g myApp
64
65 (% class="pBody" style="margin-left: 30.0px;" %)
66 {{id name="wp1028873"/}}sets the maximum java heap to 1 gigabyte.
67
68 (% class="pBody" style="margin-left: 30.0px;" %)
69 {{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.
70
71 (% class="pBody" style="margin-left: 30.0px;" %)
72 {{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.
73
74 (% class="pHeading3" style="margin-left: 54.0px;" %)
75 ==== {{id name="wp1025073"/}}Known Issue for Linux Users ====
76
77 (% class="pBody" style="margin-left: 30.0px;" %)
78 {{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:
79
80 (% style="margin-left: 60.0px;" %)
81 {{id name="wp1025054"/}}
82
83 (% class="pPreformatted" style="margin-left: 30.0px;" %)
84 (((
85
86 \\
87
88 {{{[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.}}}
89 )))
90
91 (% class="pBody" style="margin-left: 30.0px;" %)
92 {{id name="wp1025082"/}}and JRockit JVM will be exited.
93
94 (% class="pBody" style="margin-left: 30.0px;" %)
95 {{id name="wp1025055"/}}The workaround for this situation is to try different -Xmx values until you find a heap size that is setup correct.
96
97 (% style="margin-left: 60.0px;" %)
98 {{id name="wp1025057"/}}
99
100 (% style="margin-left: 54.0px;" %)
101 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
102 (((
103 **Note:**
104 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
105 (((
106 This known issue is valid for R26.0.0.
107 )))
108
109 (% class="pHeading2" style="margin-left: 54.0px;" %)
110 === {{id name="wp1020437"/}}Default Value ===
111
112 (% class="pBody" style="margin-left: 30.0px;" %)
113 {{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"]].
114
115 (% align="left" style="margin-left: 30.0px;" %)
116 (((
117
118
119 Table 2-6 Default Maximum Heap Sizes
120
121 (% style="margin-left: 54.0px;" %)
122 (% style="margin-left: 30.0px;" %)|=(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
123 (((
124 (% class="pCellHeading" style="text-align: left;margin-left: 30.0px;" %)
125 (((
126 {{id name="wp1035658"/}}Release
127 )))
128 )))|=(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
129 (((
130 (% class="pCellHeading" style="text-align: left;margin-left: 30.0px;" %)
131 (((
132 {{id name="wp1035660"/}}Platform
133 )))
134 )))|=(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
135 (((
136 (% class="pCellHeading" style="text-align: left;margin-left: 30.0px;" %)
137 (((
138 {{id name="wp1035662"/}}Default Maximum Heap Size
139 )))
140 )))
141 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
142 (((
143 (% class="pCellBody" style="margin-left: 30.0px;" %)
144 (((
145 {{id name="wp1035664"/}}R27.2 and older
146 )))
147 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
148 (((
149 (% class="pCellBody" style="margin-left: 30.0px;" %)
150 (((
151 {{id name="wp1035666"/}}Windows
152 )))
153 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
154 (((
155 (% class="pCellBody" style="margin-left: 30.0px;" %)
156 (((
157 {{id name="wp1035668"/}}75% of total physical memory up to 1 GB
158 )))
159 )))
160 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
161 (((
162 (% class="pCellBody" style="margin-left: 30.0px;" %)
163 (((
164 {{id name="wp1035670"/}}R27.2 and older
165 )))
166 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
167 (((
168 (% class="pCellBody" style="margin-left: 30.0px;" %)
169 (((
170 {{id name="wp1035672"/}}Linux, Solaris
171 )))
172 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
173 (((
174 (% class="pCellBody" style="margin-left: 30.0px;" %)
175 (((
176 {{id name="wp1035674"/}}50% of available physical memory up to 1 GB
177 )))
178 )))
179 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
180 (((
181 (% class="pCellBody" style="margin-left: 30.0px;" %)
182 (((
183 {{id name="wp1035676"/}}R27.3 and newer
184 )))
185 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
186 (((
187 (% class="pCellBody" style="margin-left: 30.0px;" %)
188 (((
189 {{id name="wp1035678"/}}Windows on a 64 bit platform
190 )))
191 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
192 (((
193 (% class="pCellBody" style="margin-left: 30.0px;" %)
194 (((
195 {{id name="wp1035680"/}}75% of total physical memory up to 2 GB
196 )))
197 )))
198 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
199 (((
200 (% class="pCellBody" style="margin-left: 30.0px;" %)
201 (((
202 {{id name="wp1035682"/}}R27.3 and newer
203 )))
204 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
205 (((
206 (% class="pCellBody" style="margin-left: 30.0px;" %)
207 (((
208 {{id name="wp1035684"/}}Linux or Solaris on a 64 bit platform
209 )))
210 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
211 (((
212 (% class="pCellBody" style="margin-left: 30.0px;" %)
213 (((
214 {{id name="wp1035686"/}}50% of available physical memory up to 2 GB
215 )))
216 )))
217 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
218 (((
219 (% class="pCellBody" style="margin-left: 30.0px;" %)
220 (((
221 {{id name="wp1035700"/}}R72.3 and newer
222 )))
223 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
224 (((
225 (% class="pCellBody" style="margin-left: 30.0px;" %)
226 (((
227 {{id name="wp1035702"/}}Windows on a 32 bit platform
228 )))
229 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
230 (((
231 (% class="pCellBody" style="margin-left: 30.0px;" %)
232 (((
233 {{id name="wp1035704"/}}75% of total physical memory up to 1 GB
234 )))
235 )))
236 (% style="margin-left: 30.0px;" %)|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
237 (((
238 (% class="pCellBody" style="margin-left: 30.0px;" %)
239 (((
240 {{id name="wp1035694"/}}R27.3 and newer
241 )))
242 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
243 (((
244 (% class="pCellBody" style="margin-left: 30.0px;" %)
245 (((
246 {{id name="wp1035696"/}}Linux on a 32 bit platform
247 )))
248 )))|(% style="margin-left: 30.0px;" %)(% style="margin-left: 30.0px;" %)
249 (((
250 (% class="pCellBody" style="margin-left: 30.0px;" %)
251 (((
252 {{id name="wp1035698"/}}50% of available physical memory up to 1 GB
253 )))
254 )))
255
256
257 )))
258
259 (% class="pBody" %)
260
261
262 (% class="pHeading2" style="margin-left: 54.0px;" %)
263 === {{id name="wp1027832"/}}Flags or Other Options Affected ===
264
265 (% class="pBody" style="margin-left: 30.0px;" %)
266 {{id name="wp1014694"/}}None.
267
268 (% class="pHeading2" style="margin-left: 54.0px;" %)
269 === {{id name="wp1010574"/}}Exceptions ===
270
271 (% class="pBody" style="margin-left: 30.0px;" %)
272 {{id name="wp1029250"/}}When using-Xmx, be aware of the following exceptions:
273
274 (% class="pSmartList1Bullet" style="margin-left: 30.0px;" %)
275 (((
276 *
277 ** {{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.
278 ** {{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.
279 ** {{id name="wp1029254"/}}The minimum value for -Xmx is 16 MB.
280 )))
iSymphony