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
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 = 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
| examples =  
+
| examples = These options are general to the Sun JVM, and will work in a JDK 6 installation.
 
+
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:
 
To print the implicit flags that the JVM is configured with:

Revision as of 19:50, 23 February 2011



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




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:

   -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] 

or 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