Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A little background: I have a webapp that has both Servlet/JSP dynamic content and static files. Pages are always dynamic, and ~10 static resources are served for each page. Everything is served over HTTP (Tomcat Native seems to help more with HTTPS). I plan on hosting this webapp under Tomcat 7 and Java 6.

I'm debating whether or not to use Tomcat Native. Is it worth the trouble/risk, or these days, is Hotspot fast enough that I'm better off not bothering with Tomcat Native? At the end of the day, I'll probably benchmark the two, but I'm also looking for people's experiences.

share|improve this question
Can you say something about the "trouble/risk" that you are concerned about? On Ubuntu it's a simple "apt-get install libtcnative-1" to install, and there doesn't seem any configuration necessary (see – Dan Mar 9 '12 at 17:44
I'll probably be compiling it on my own, so the "trouble" is ~30 minutes of poking around...which isn't much, but if the benefit is negligible, it still might not be worth the time. As for risk, it's native code--one segmentation fault might be able to take down the JVM. – David Ehrmann Mar 9 '12 at 23:11
up vote 2 down vote accepted

(Disclaimer: I've no data to back this claim).

I've found out that native Tomcat (APR) helps more with SSL/HTTPS. It still is a lot slower than, say, Apsis Pound doing SSL on a separate machine.

For static files, the APR seems to help with memory-mapping the static resource and makes things a little faster when in the order of hundreds of requests/sec, but then again the correct HTTP caching of static resources helps a lot more (since not so many requests for the static resource come in).

All in all, I don't think it's worth it, if you're going to compile everything by hand (you'd be out of Java-land).

If it's a simple apt-get install, go for it.

In any case, I'd invest more in Pound SSL termination or Varnish caching.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.