Jan 17, 2015

Comparison of Tomcat connections to JDBC connections

I tried posting this as a survey question on stack overflow, but apparently it is too broad they said.

Perhaps I can still get some comments/ feedback from people through a blog.

I'm tuning ratios between Tomcat 6/7 server threads and Oracle JDBC threads to avoid "Waiting for Idle Object" errors and wanted to get a sample of production ratios.

I'd like to gather metrics and provide some analysis back to the community. If you can, please provide your production quantities of max tomcat server connections and max jdbc connections (please don't post the whole server.xml or sensitive information). I realize every application is different, but it'd be interesting to see if there are general rules or correlations.

Here is a link to the survey.
  • This - using 400:200
  • These setups for Weblogic seem to use a 1:1 ratio.
  • This - requested server.xml for comparison.
  • This uses 25:55 (1:2.2) ratio.
  • This had the Connection Timeout : Waiting for Idle Object. issue with 600 server connections and 100 jdbc connections.
  • This - should have jdbc > threads.
  • This - says 1:1.25 should work (safety factor).
  • This has an interesting article (related to flexypool) on performing the analysis
  • This reading on p.95 says start with 1:1 but then add at least one to prevent deadleak.
  • This recommends a funnel approach HIS(1000) -> WAS (50) -> DB (30).
  • This suggests a 200-800 range.
  • This suggests 200-800 (400 to start). connectionTimeout > 20000 too high (we are 60000).
  • This 800-1000 for a quad core machine is no problem.
  • This shows a 1.875:1 ratio.

No comments:

Post a Comment