Re: Mod_perl vs mod_php
On Dec 13, Roger Espel Llima wrote: > So, does anyone know what PHP does? Does it parse the mixture of > PHP and HTML every time? Does it keep a cache? Does it limit the > size of this cache (which Apache::Registry doesn't)?. How big does > a typical Apache/PHP process get? both php3 and php4 reparse every file, out of the box. php3 parses and executes simultaneously, php4 is more like perl and has a two-step compile-and-execute. the php4 runtime is designed to allow plugins to do caching of compiled scripts. bwcache (http://bwcache.bware.it/) is one such plugin, and zend cache (http://www.zend.com/zend/products.php#cache) is another that is supposed to be released soon. i don't know about a 'typical' apache/php process, but the httpd processes on www.php.net run at around seven megs (vsz -- rss is around 3-5 megs). but that's a totally meaningless number, of course, since it doesn't take into account any shared pages across those processes. (for what its worth, www.php.net runs on a dual p3/650 with 512M of ram and does about four million page views and 300 gigs of raw traffic a month. i would consider that an atypical setup -- most users of php are the people who host at the scads of shared hosting companies that offer php support.) for comparisons of php and mod_perl, i would focus on the things you can do in mod_perl that you simply can't in perl (handlers for phases other than content-handling, for example). mod_perl gives you a lot more rope to do cool things and to hang yourself with. (the former is why most of us are here, the latter is why there aren't scads of shared hosting companies that offer mod_perl.) jim
Re: Mod_perl vs mod_php
"Jimi Thompson" <[EMAIL PROTECTED]> wrote: > Does anyone have any mod_perl vs. mod_php benchmarks? Speaking of PHP, does anyone here know how mod_php handles the memory bloat / precompilation problem? Preloading scripts is obviously a good thing (eg with the PerlStart directive), we all know this on this list. And even if you don't do preloading, things like Apache::Registry keep your compiled scripts in memory so the code doesn't have to get parsed again on each request. So, does anyone know what PHP does? Does it parse the mixture of PHP and HTML every time? Does it keep a cache? Does it limit the size of this cache (which Apache::Registry doesn't)?. How big does a typical Apache/PHP process get? I think these are all questions that we mod_perlers should be at least familiar with... if only to respond to questions of PHPers, or to improve mod_perl with any good ideas that mod_php may have. -- Roger Espel Llima, [EMAIL PROTECTED] http://www.iagora.com/~espel/index.html
Re: Mod_perl vs mod_php
On Tue, 12 Dec 2000, Perrin Harkins wrote: > Please read the archives of this list before asking for Perl/PHP > comparisons. It has been discussed ad nauseum. There are many good > search interfaces for the list archives that will direct you to the > previous posts. To mention a few http://perl.apache.org/#general-list :) _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Mod_perl vs mod_php
Please read the archives of this list before asking for Perl/PHP comparisons. It has been discussed ad nauseum. There are many good search interfaces for the list archives that will direct you to the previous posts. - Perrin
Re: Mod_perl vs mod_php
On Tue, Dec 12, 2000 at 02:53:30PM -0800, Randal L. Schwartz wrote: > > "newsreader" == newsreader <[EMAIL PROTECTED]> writes: > > newsreader> Maybe he meant php hello world vs perl hello world? > > And the point of such a comparison would be... what? it will be to publish in your favorite magazine/web site/mailing list/whatever Did you miss chamas' hello world thread? I don't really care for benchmark myself but your point they way I understand was that it was not possible to make benchmark comparison. In fact in theory it is possible even beyond hello world. Take two programmers from perl and php worlds and give them the same problem. It *is* possible to make a comparison of the resultant applications. Purely technical comparison. > The real costs of a web application these days are the total product Now you are talking about something other than technical comparison. Wouldn't that be like saying "ferrari has a bigger top speed than corolla does but so what corolla gets better gas mileage." It all depends on how benchmark is to be used. transactions-per-second is an important factor that determines whether or not somebody will come back to your site, I think. So if you are shooting for yahoo like numbers maybe you should start thinking transaction-per-second. you are the one who frequently touts the virtue of writing a real handler instead of using registry?? what is your point about such energetic touting? What I really like to see compared is the development time of php vs perl code for a given problem. I've read ad nauseam about perl development time being shorter than C. How does php compare to perl in this regard, I wonder. > costs, not the transactions-per-second costs. Until you're getting > Yahoo-number hits, does it really matter whether something takes 1 > second vs 3 seconds to process? And even then, shouldn't you be more > worried about which of these two systems better supports 304 responses > and data caching and dependency tracking, instead of which one > executes a useless static page faster? > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: Mod_perl vs mod_php
> "newsreader" == newsreader <[EMAIL PROTECTED]> writes: newsreader> Maybe he meant php hello world vs perl hello world? And the point of such a comparison would be... what? The real costs of a web application these days are the total product costs, not the transactions-per-second costs. Until you're getting Yahoo-number hits, does it really matter whether something takes 1 second vs 3 seconds to process? And even then, shouldn't you be more worried about which of these two systems better supports 304 responses and data caching and dependency tracking, instead of which one executes a useless static page faster? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: Mod_perl vs mod_php
> Does anyone have any mod_perl vs. mod_php benchmarks? Given the fact you are the good programmer either would be about the same. If you can't program your way out of a paper bag, benchmarks won't help you. Benchmarks are for managers, are you the one? pavel
Re: Mod_perl vs mod_php
Maybe he meant php hello world vs perl hello world? On Tue, Dec 12, 2000 at 01:16:59PM -0800, Randal L. Schwartz wrote: > > "Jimi" == Jimi Thompson <[EMAIL PROTECTED]> writes: > > Jimi> Does anyone have any mod_perl vs. mod_php benchmarks? > > Perl code gets 0 performance on PHP. > PHP code likewise gets 0 performance on Perl. > > Given that, you've got to write different code on both, and you can > probably always come up with enough variance that you can make > benchmarks show whatever you want them to show. > > Given *that*, what's your real question? > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: Mod_perl vs mod_php
> "Jimi" == Jimi Thompson <[EMAIL PROTECTED]> writes: Jimi> Does anyone have any mod_perl vs. mod_php benchmarks? Perl code gets 0 performance on PHP. PHP code likewise gets 0 performance on Perl. Given that, you've got to write different code on both, and you can probably always come up with enough variance that you can make benchmarks show whatever you want them to show. Given *that*, what's your real question? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!