Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Howto/Garbage Collection"

< Jetty‎ | Howto
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{Jetty Howto
 
{{Jetty Howto
| introduction = Tuning the garbage collection of the JVM can greatly improve performance of Jetty.  Specifically it can avoid pauses while the system performs full garbage collections.  Tuning the GC really depends on the behaviour of the application and needs detailed analysis, however there are general recommendations
+
| introduction =  
| examples = These options are general to the Sun JVM, and will work in a JDK 6 installation.
+
  
To print the implicit flags that the JVM is configured with:
+
{{Jetty Redirect|http://www.eclipse.org/jetty/documentation/current/garbage-collection.html}}
 +
 
 +
Tuning the JVM garbage collection (GC) can greatly improve Jetty performance.  Specifically, you can avoid pauses while the system performs full garbage collections. Optimal tuning of the GC depends on the behaviour of the application and requires detailed analysis, however there are general recommendations.
 +
| examples = These options are general to the Sun JVM, and work in a JDK 6 installation. They provide good information about how your JVM is running; based on that initial information, you can then tune more finely.
 +
 
 +
To print the implicit flags with which the JVM is configured:
 
     -XX:+PrintCommandLineFlags  
 
     -XX:+PrintCommandLineFlags  
  
Line 9: Line 13:
 
     -XX:+DisableExplicitGC  
 
     -XX:+DisableExplicitGC  
  
to print the date and time stamps of GC activity with details:
+
To print the date and time stamps of GC activity with details:
 
     -XX:+PrintGCDateStamps \
 
     -XX:+PrintGCDateStamps \
 
     -XX:+PrintGCTimeStamps \
 
     -XX:+PrintGCTimeStamps \
Line 15: Line 19:
 
     -XX:+PrintTenuringDistribution
 
     -XX:+PrintTenuringDistribution
  
to log GC details to a file:
+
To log GC details to a file:
 
     -Xloggc:[path/to/gc.log]  
 
     -Xloggc:[path/to/gc.log]  
  
or to print GC activity with less detail:
+
To print GC activity with less detail:
 
     -verbose:gc  
 
     -verbose:gc  
  
To use the concurrent marksweep GC with full GC at 80% old generation full
+
To use the concurrent marksweep GC with full GC at 80% old generation full:
 
     -XX:+UseConcMarkSweepGC \
 
     -XX:+UseConcMarkSweepGC \
     -XX:CMSInitiatingOccupancyFraction=80,
+
     -XX:CMSInitiatingOccupancyFraction=80
  
 
}}
 
}}

Latest revision as of 14:53, 23 April 2013



Introduction

Warning2.png
Jetty 7 and Jetty 8 are now EOL (End of Life)




THIS IS NOT THE DOCUMENTATION YOU ARE LOOKING FOR!!!!!






All development and stable releases are being performed with Jetty 9 and Jetty 10.






This wiki is now officially out of date and all content has been moved to the Jetty Documentation Hub






Direct Link to updated documentation: http://www.eclipse.org/jetty/documentation/current/garbage-collection.html


Tuning the JVM garbage collection (GC) can greatly improve Jetty performance. Specifically, you can avoid pauses while the system performs full garbage collections. Optimal tuning of the GC depends on the behaviour of the application and requires detailed analysis, however there are general recommendations.




Examples

These options are general to the Sun JVM, and work in a JDK 6 installation. They provide good information about how your JVM is running; based on that initial information, you can then tune more finely.

To print the implicit flags with which the JVM is configured:

   -XX:+PrintCommandLineFlags 

To disable explicit GC performed regularly by RMI:

   -XX:+DisableExplicitGC 

To print the date and time stamps of GC activity with details:

   -XX:+PrintGCDateStamps \
   -XX:+PrintGCTimeStamps \
   -XX:+PrintGCDetails \
   -XX:+PrintTenuringDistribution

To log GC details to a file:

   -Xloggc:[path/to/gc.log] 

To print GC activity with less detail:

   -verbose:gc 

To use the concurrent marksweep GC with full GC at 80% old generation full:

   -XX:+UseConcMarkSweepGC \
   -XX:CMSInitiatingOccupancyFraction=80

Back to the top