File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Avoiding long gc pauses

 
Satya Maheshwari
Ranch Hand
Posts: 368
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you share JVM options used to start Tomcat.
 
Ove Lindström
Ranch Hand
Posts: 326
Android Firefox Browser Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic