Do Rev CGI Suffer Performance HIts?
Alex Tweedly
alex at tweedly.net
Mon May 16 14:49:33 EDT 2005
Richard Gaskin wrote:
> Dan Shafer wrote:
>
>> On another thread, jbv (JB) wrote about using Rev as a CGI engine on
>> Linux as a matter of regular course.
>>
>> I'm curious. I've been laying out a design for an INternet-based app
>> and figuring I'd have to use Python (which is OK because I love it
>> but in some ways it may be overkill for this project) because of my
>> understanding that a Rev CGI can't handle even modest volumes of
>> traffic. This is apparently because a separate instance of the CGI
>> is launched for each HTTP request received.
>>
>> True or myth?
>
>
> It's true on all non-Mac servers (Macs can use Apple events), but how
> is this different from Perl or Python?
>
It's the same, for Perl as CGI and Python as CGI. But both mod_perl and
mod_python exist, and are (reputedly, haven't seen any figures or
benchmark numbers) much faster than starting a new interpreter each time.
> I know that in recent years there's an option in Apache to keep Perl
> resident in memory, but behaviorally it still acts as a separate
> instance.
>
> If there isn't commonly the same sort of option for Python, then my
> hunch is that the resource demand would be measured by a combination
> of engine size (load time) and engine efficiency, and may not differ
> dramatically from the Rev engine. Jacque recalls Scott Raney once
> noting that when called as a CGI, the "faceless" engine does a lot
> less work at startup and loads almost instantaneously, even faster
> than a scriptless standalone.
>
> Do I misunderstand something about CGI and/or Python?
>
> Anyone have any hard comparison data about relative efficiencies
> between Rev and Python?
Yeah - they're both faster than the other for some things. Tell me
which area you're interested in and I'll concoct a benchmark to prove
that one is faster than the other; you tell me which one you want to
win, and I'll make it win :-)
There is always the other option, of running a Rev (or Python, or Perl,
...) server, and serving requests directly from that. This can give
significantly better response times and significantly higher transaction
rates - but it means the server needs to satisfy all requests - even
those that could have been left to basic html. And it means that you
have a single instance - so in some cases the programming gets orders of
magnitude harder, while in others it might get easier.
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.9 - Release Date: 12/05/2005
More information about the use-livecode
mailing list