You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by laredotornado <la...@gmail.com> on 2010/07/21 23:07:20 UTC

Tuning garbage collection

Hi,

I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you
use to tune your garbage collection parameters?

Further, does anyone know how to read entries in the garbage collection log? 
Entries in my log look like

Desired survivor size 10944512 bytes, new threshold 1 (max 15)
 [PSYoungGen: 129311K->3232K(136512K)] 558882K->434085K(585920K), 0.0090900
secs]

Thanks, - Dave
-- 
View this message in context: http://old.nabble.com/Tuning-garbage-collection-tp29230790p29230790.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tuning garbage collection

Posted by Ronald Klop <ro...@base.nl>.
Op donderdag, 22 juli 2010 14:14 schreef paul womack <pw...@papermule.co.uk>:> 
>  
> laredotornado wrote:
> > Hi,
> > 
> > I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you
> > use to tune your garbage collection parameters?
> 
> My main strategy is to see if I have any cripping GC problems.
> 
> If not, I leave the GC to its own (or Sun's) devices.
> 
> GC tuning is likely to be outdated/obseleted
> almost as soon as you've done it.
> 
>     BugBear
> 
> 
> 
> 
> 
Just run jstat -gc on your live server for a while and check the overhead of GC. If it is to high add some memory.

Ronald.

Re: Tuning garbage collection

Posted by paul womack <pw...@papermule.co.uk>.
laredotornado wrote:
> Hi,
> 
> I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/strategies you
> use to tune your garbage collection parameters?

My main strategy is to see if I have any cripping GC problems.

If not, I leave the GC to its own (or Sun's) devices.

GC tuning is likely to be outdated/obseleted
almost as soon as you've done it.

    BugBear

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tuning garbage collection

Posted by Ken Bowen <kb...@als.com>.
Google is your friend:
	java garbage collection log format
quickly leads to
	http://stackoverflow.com/questions/895444/java-garbage-collection-log-messages
and others

Then figure out if you actually have a problem which requires any  
adjustment.

On Jul 21, 2010, at 5:07 PM, laredotornado wrote:

>
> Hi,
>
> I'm using Tomcat 6.0.26, Java 1.6 and wondering what tools/ 
> strategies you
> use to tune your garbage collection parameters?
>
> Further, does anyone know how to read entries in the garbage  
> collection log?
> Entries in my log look like
>
> Desired survivor size 10944512 bytes, new threshold 1 (max 15)
> [PSYoungGen: 129311K->3232K(136512K)] 558882K->434085K(585920K),  
> 0.0090900
> secs]
>
> Thanks, - Dave
> -- 
> View this message in context: http://old.nabble.com/Tuning-garbage-collection-tp29230790p29230790.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tuning garbage collection

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: laredotornado [mailto:laredotornado@gmail.com]
> Subject: Tuning garbage collection
> 
> I'm using Tomcat 6.0.26, Java 1.6 and wondering what 
> tools/strategies you use to tune your garbage collection
> parameters?

Usually, just give the JVM as big a heap as will fit on your system with inducing paging, and let the GC algorithms figure out what to do with it.  Second-guessing the GC usually ends up degrading performance, unless you're willing to do a lot of experimentation using the workloads you actually have.  If you really want to play with it (and have a lot of spare time), start here:
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp

In particular, look at this one:
http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html

Optimizing your webapps (and data base) almost always provides greater benefit that fiddling with GC settings.

> Further, does anyone know how to read entries in the garbage 
> collection log?

See the above reference.

> Desired survivor size 10944512 bytes, new threshold 1 (max 15)

That says the survivor space is just under 11 MB, and objects will be moved to the survivor space after just one collection.

> [PSYoungGen: 129311K->3232K(136512K)] 558882K->434085K(585920K),

The young generation usage was 129 MB before the GC, 3 MB after, and the young gen could use up as much as 136 MB.  The total heap usage was 558 MB, shrunk to 434 MB by the GC, and could reach a maximum of 585 MB.

> 0.0090900 secs]

The minor GC took just over 9 milliseconds.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org