Help me beat Java.

2000-12-13 Thread jleidigh

I have written a awsome mod_perl module for Apache and
now my companie wants to transform it to Java (ik).
Nothing personal against java but 95% of the program is
regular expressions. Perl is king in this area. In
java they are using Oroinc 3rd party classes for the
regexs. With some prliminary bench mark test of non
mod_perl perl and Java, perl won being 12-20 times
faster. But now they want to do super tuning and also
compare Resource consumption between JRun/Java Servlets
and Apache/mod_perl. My main concern is the fact that
apache/mod_perl child proccess can be as big as 12 MB.
Specifically my question is

1. Is there a way to make mod_perl multi-threaded?

2. Is there a way to lower this memory consumtion?

3. Is there a way to precomplie perl to machine code to
better perfomance? They are planning to do the same for
Java and may gain performance.

Help me beat Java, please.
_
UOLMAIL - Todo Argentino tiene derecho a tener su e-mail.
http://www.uolmail.com.ar





Re: Help me beat Java.

2000-12-13 Thread Stas Bekman

[some intro snipped]
 and Apache/mod_perl. My main concern is the fact that 
 apache/mod_perl child proccess can be as big as 12 MB. 

even as big as 12.5MB :)

 Specifically my question is
 
 1. Is there a way to make mod_perl multi-threaded?

http://perl.apache.org/~dougm/modperl_2.0.html

 2. Is there a way to lower this memory consumtion?

http://perl.apache.org/guide/performance.html
http://perl.apache.org/guide/performance.html#Know_Your_Operating_System

 3. Is there a way to precomplie perl to machine code to 
 better perfomance? They are planning to do the same for 
 Java and may gain performance. 

see #2

_
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: Help me beat Java.

2000-12-13 Thread Nigel Hamilton


 I have written a awsome mod_perl module for Apache and 
 now my companie wants to transform it to Java (ik). 
 Nothing personal against java but 95% of the program is 
 regular expressions. Perl is king in this area. In 
 java they are using Oroinc 3rd party classes for the 
 regexs. With some prliminary bench mark test of non 
 mod_perl perl and Java, perl won being 12-20 times 
 faster. But now they want to do super tuning and also 
 compare Resource consumption between JRun/Java Servlets 
 and Apache/mod_perl. My main concern is the fact that 
 apache/mod_perl child proccess can be as big as 12 MB. 
 Specifically my question is
 
 
 2. Is there a way to lower this memory consumtion?
 


I haven't had time to look into this, but Gunther mentioned a new module
CGI::SpeedyCGI  this enables persistent perl processes, outside of
Apache. Could you reduce the number of Apache Children and replace them
with SpeedyCGI backends? 

This should save memory and give you more waiting processes to answer
requests!

I haven't tested this  but would be interested to know if anyone has
done this comparison?

I suppose it depends on whether or not you are using Apache:: modules that
need to be tied into the server --- if not, then maybe SpeedyCGI will save
you some memory?


NIge






Re: Help me beat Java.

2000-12-13 Thread Gunther Birznieks

At 10:24 AM 12/13/00 -0300, jleidigh wrote:
I have written a awsome mod_perl module for Apache and
now my companie wants to transform it to Java (ik).

Why would your company want to redevelop something from scratch in another 
language instead of making use of the product they have now that works?

That seems really odd to be in a company that wishes to reinvent the wheel?

Nothing personal against java but 95% of the program is
regular expressions. Perl is king in this area. In
java they are using Oroinc 3rd party classes for the
regexs. With some prliminary bench mark test of non
mod_perl perl and Java, perl won being 12-20 times
faster. But now they want to do super tuning and also
compare Resource consumption between JRun/Java Servlets
and Apache/mod_perl. My main concern is the fact that
apache/mod_perl child proccess can be as big as 12 MB.
Specifically my question is

1. Is there a way to make mod_perl multi-threaded?

Yes, but not for the benefits you want. It doesn't matter if Perl is 
multi-threaded because two things lag behind -- Apache 2.0 as a 
multithreaded partner and CPAN modules that are within-Perl thread-safe. 
The first will happen given time, the 2nd is a problem that may never be 
solved (at least not for a year or two).

2. Is there a way to lower this memory consumtion?

Some but not really that much other than being intelligent about 
preloading. Apache 2.0/mod_perl 2.0 models are supposed to be hooking into 
future versions of Perl to separate CODE and DATA segments within Perl 
itself. Right now Perl P-Code is mixed within data in Perl, so 
copy-on-write slowly degrades when it doesn't have to.

3. Is there a way to precomplie perl to machine code to
better perfomance? They are planning to do the same for
Java and may gain performance.

Not really unless you are talking about not using mod_perl. I don't know of 
any servlet engines that exist that can load machine code compiled servlets 
though. I know TowerJ and products like that, but they compile an entire 
Java application, which doesn't fit well in the dynamically loadable apps.

I think when you compile a Java app there is a possibility you may lose 
some capability of integrating with existing Java classesI think a 
similar thing holds true for compiling perl to machine code -- I am not 
sure if its ever gone beyond beta stage technology on Perl though.

Anyway, we know that Java is better at some things. So I think its been 
said here before... Time to market may be an issue for your company. Can 
your company realistically afford to play with Java and do they really need 
those features you mentioned.

Also, Java servlets is an app development technology. Mod_perl is MORE than 
that. But perhaps your company doesn't need that side of mod_perl.

Anyway, Good Luck.

Later,
Gunther





Re: Help me beat Java.

2000-12-13 Thread Vivek Khera

 "j" == jleidigh  [EMAIL PROTECTED] writes:

j faster. But now they want to do super tuning and also
j compare Resource consumption between JRun/Java Servlets
j and Apache/mod_perl. My main concern is the fact that
j apache/mod_perl child proccess can be as big as 12 MB.
j Specifically my question is

j 1. Is there a way to make mod_perl multi-threaded?

Not until apache 2.0 and mod_perl 2.0

j 2. Is there a way to lower this memory consumtion?

Yes. See "The Guide".  If they are going to compare Java servlets,
then you must configure your mod_perl to act as a pure mod_perl server
rather than a server that answers all requests.  This is the
front-end/back-end setup that The Guide describes.

j 3. Is there a way to precomplie perl to machine code to
j better perfomance? They are planning to do the same for
j Java and may gain performance.

Don't think so, but there could be.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/



Re: Help me beat Java.

2000-12-13 Thread G.W. Haywood

Hi all,

On Wed, 13 Dec 2000, Vivek Khera wrote:

 j 3. Is there a way to precomplie perl to machine code to
 
 Don't think so, but there could be.

There's a Perl to C translator but I don't tink you want to go there.

73,
Ged.





Re: Help me beat Java.

2000-12-13 Thread Stas Bekman

On Wed, 13 Dec 2000, G.W. Haywood wrote:

 Hi all,
 
 On Wed, 13 Dec 2000, Vivek Khera wrote:
 
  j 3. Is there a way to precomplie perl to machine code to
  
  Don't think so, but there could be.
 
 There's a Perl to C translator but I don't tink you want to go there.

It doesn't make the code run faster. It only helps if you want to hide the
source code (to make it harder to get to the source code :) 

and it won't work under mod_perl anyway.

_
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: Help me beat Java.

2000-12-13 Thread G.W. Haywood

Hi Stas,

On Wed, 13 Dec 2000, Stas Bekman wrote:
 On Wed, 13 Dec 2000, G.W. Haywood wrote:
  There's a Perl to C translator but I don't tink you want to go there.
 
 It doesn't make the code run faster. It only helps if you want to hide the
 source code (to make it harder to get to the source code :) 
 
 and it won't work under mod_perl anyway.


I know.  I _said_ he didn't want to go there...:)

73,
Ged.