• 15

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Is Tomcat Native worth the trouble?

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.

    • 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.

(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.

  • 3
Reply Report

Trending Tags