aspose file tools*
The moose likes Performance and the fly likes Avoiding long gc pauses Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Avoiding long gc pauses" Watch "Avoiding long gc pauses" New topic
Author

Avoiding long gc pauses

Satya Maheshwari
Ranch Hand

Joined: Jan 01, 2007
Posts: 368
Hi

I have a web application running on tomcat. The problem I am facing is that occasionally the full gc pauses become abnormally long (>100 secs).

In order to address it, I used concurrent mark sweep for gc as the hardware has multicore processor but it did not solve the problem completely. Any guidelines/directions on what else can be done to address this.

Thanks


Thanks and Regards
Rishi Shehrawat
Ranch Hand

Joined: Aug 11, 2010
Posts: 218

Can you share JVM options used to start Tomcat.
Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

Some suggestions:

Increase the socket.bufferPool. Default is 500. Could be a lot more.

Use multiple Tomcats. Two Tomcat instances running on the same machine and having a load balancer (like HTTPD or similar) as common front is often less prone to do large gc hangups.

I have found this page to be most useful when dealing with TC performance. http://www.solutionhacker.com/tomcat-performance-tuning/
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2433
    
  28

Have you taken a heap dump to see where memory is being used? You need to find out first where memory is being used? Is it your app or Tomcat?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Avoiding long gc pauses