Java Options: Difference between revisions

From LogicalDOC Community Wiki
Jump to navigationJump to search
No edit summary
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
{| cellspacing="1" cellpadding="1" border="1" style="width: 671px; height: 240px;"
{| cellspacing="1" cellpadding="1" border="1" style="width: 671px; height: 240px;"
|-
|-
| -Xmx900m <br>  
| -Xmx4500m <br>  
| maximum Java heap size (900 megabytes)<br>
| maximum Java heap size (4,500 megabytes)<br>
|-
| -XX:MaxPermSize=384m<br>
| maximum Size of the Permanent Generation (384 megabytes)<br>
|-
|-
| -Xms512m<br>  
| -Xms512m<br>  
Line 40: Line 37:


Should therefore be careful when using these options on a JVM 1.6.<br>For the latest list of available options for the J2SE 6.0 refer to the following documentation:<br>  
Should therefore be careful when using these options on a JVM 1.6.<br>For the latest list of available options for the J2SE 6.0 refer to the following documentation:<br>  
=== JVM 1.5 - J2SE 5  ===
A Collection of JVM Options<br>[http://blogs.sun.com/watt/resource/jvm-options-list.html http://blogs.sun.com/watt/resource/jvm-options-list.html]<br>Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine<br>[http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html]<br>tagtraum industries incorporated ~ GCViewer VMFlags<br>[http://www.tagtraum.com/gcviewer-vmflags.html http://www.tagtraum.com/gcviewer-vmflags.html]<br>[http://gregluck.com/blog/archives/2006/07/how-we-solved-our-garbage-collection-pausing-problem/ http://gregluck.com/blog/archives/2006/07/how-we-solved-our-garbage-collection-pausing-problem/]<br>[http://www.theserverside.com/news/thread.tss?thread_id=41258 http://www.theserverside.com/news/thread.tss?thread_id=41258]<br>


=== JVM 1.6 - J2SE 6  ===
=== JVM 1.6 - J2SE 6  ===
Line 49: Line 42:
Java HotSpot VM Options<br>[http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp]<br>Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning<br>[http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html]<br>[http://java.sun.com/performance/reference/whitepapers/6_performance.html http://java.sun.com/performance/reference/whitepapers/6_performance.html]  
Java HotSpot VM Options<br>[http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp]<br>Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning<br>[http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html]<br>[http://java.sun.com/performance/reference/whitepapers/6_performance.html http://java.sun.com/performance/reference/whitepapers/6_performance.html]  


[http://collab.sakaiproject.org/pipermail/sakai-dev/2009-September/003682.html http://collab.sakaiproject.org/pipermail/sakai-dev/2009-September/003682.html]<br>
[http://collab.sakaiproject.org/pipermail/sakai-dev/2009-September/003682.html http://collab.sakaiproject.org/pipermail/sakai-dev/2009-September/003682.html]<br>
 
<br>
 
<br>

Latest revision as of 08:05, 19 September 2025

If you launch from a shell the command: java -?
this will return the list of available options for the command.

By running the command: java -X
instead will be shown a list of non-standard options.
Note: This list may vary from version to version of Java and is subject to change (between versions) without warning or notice.

Options that are specified with -XX are not stable and are not recommended for casual use.
These options are subject to change without notice.

-Xmx4500m
maximum Java heap size (4,500 megabytes)
-Xms512m
initial Java heap size
-XX:MaxNewSize=24m
Maximum size of new generation
-XX:NewSize=24m
Default size of new generation
-XX:+UseParNewGC
Parallel Young Generation garbage collector (for multiprocessor machines)
-XX:+CMSParallelRemarkEnabled
Attempt to descrease remark pauses when used with -XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
Enable the concurrent low pause collector
-Dorg.apache.el.parser.COERCE_TO_ZERO=false
If true, when coercing expressions to numbers "" and null will be coerced to zero as required by the specification. If not specified, the default value of true will be used.


Note: Many of the options presented are related to JVM 1.4 in particular, refer to the following URLs:
http://java.sun.com/docs/hotspot/gc1.4.2/faq.html
http://www.petefreitag.com/articles/gctuning/

Should therefore be careful when using these options on a JVM 1.6.
For the latest list of available options for the J2SE 6.0 refer to the following documentation:

JVM 1.6 - J2SE 6

Java HotSpot VM Options
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning
http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html
http://java.sun.com/performance/reference/whitepapers/6_performance.html

http://collab.sakaiproject.org/pipermail/sakai-dev/2009-September/003682.html