Bob Tanner <tanner at real-time.com> writes: > Quoting David Dyer-Bennet (dd-b at dd-b.net): > > What's servlet performance like? As you say, not relative to C; how > > about relative to Perl, or PHP? Or Cold Fusion? Comparing the two on > > the same platform of course. > > For heavily hit sites servlets out perform perl. Especially when it comes to > memory and cpu usage. Because all of the servlet containers I have used, load > just 1 copy of the servlet and it's run as a multi-threaded application. > > On a lightly used site, servlets are memory hogs and perl might be better > choice. Here are some real world (production server) numbers of a site we are in > the progress of moving from perl to servlets. Ooh, actual information.... > Using tomcat 3.2 and Sun's JDK 1.3.0_32. > > The JVM takes 36.6Mb of core that is with all servlets loaded and > started at run time. This site is heavily dynamic and typically > takes 1 million servlet requests a month. > > Using perl-5.00503, on RedHat 6.2, each perl request needed to fork/exec the > perl interpreter, which takes 8Mb of core. If you get 5 simultaneous requests, > you are already over the core size of ALL the servlets. Remember this is just > one cgi and the site has hundreds. Yep, that's of course the problem of Perl (and not PHP or Cold Fusion). > There where many times when the box would thrash the drives because of all the > perl interpreters chewing up core. > > Yes, mod_perl can help here, but servlets still scale better. That's not a total surprise. Um, were you thinking of the thing whose name I can't remember that lets you do perl embedded in the page (which I think depends on mod_perl), or is there something clever to do with mod_perl itself that helps directly? (Kinda ignorant about mod_perl obviously). > Because all(?) of the servlet containers allow you to specific the VM's memory > usage and stack size you can actually keep resource utilization in check. > > I do not have any comparsion data on php, but I think it scales, look at > sourceforge. So they say. > Cold fusion is mostly windows based, so I have not touched it. I used it quite a lot in a previous life, and it did remarkably well all things considered. For that paradigm, I mean. I note you talk almost entirely about memory use here; and obviously that's a strong reason you or anybody might be driven off Perl on a heavily-used dynamic site. Any feeling for other performance measures? -- David Dyer-Bennet / Welcome to the future! / dd-b at dd-b.net SF: http://www.dd-b.net/dd-b/ Minicon: http://www.mnstf.org/minicon/ Photos: http://dd-b.lighthunters.net/