You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Jim Morrison [Mailing-Lists]" <ju...@mediaisotope.com> on 2003/03/13 16:15:34 UTC

Dual Processors & Mod Perl

Hey ho,

Sorry if this is an FAQ or a little OT..

We're thinking of moving a couple of servers and one of the
possibilities is a dual PIII box (Compaq AFAIK, probably pretty standard
rack box)

I'm just wondering how Linux (RedHat 7.2) deals with dual processors,
and whether any of the following will have problems:

 - Apache & mod_perl themselves (currently use v1's rather than 2's)
 - LibXML,XSLT etc running under mod_perl
 - A whole bunch of CPAN mods!

Does linux just take care of 2 proccessors or does the code have to be
compatable?

Also out of pure curiosity does it actually double the capabilities of
the machine? (The jump from our current 128Mb to 1GB of RAM will - I'm
guessing - have more of an impact ;-)


Cheers..  


Jimbo



_____________________________
Jim Morrison
Technology & Development Partner
Isotope Communications
9 Green Park Station
Bath, BA1 1JB, UK
+44 (0) 1225 444 674
http://www.mediaisotope.com/





Re: Dual Processors & Mod Perl

Posted by Stas Bekman <st...@stason.org>.
Jim Morrison [Mailing-Lists] wrote:
[...]

> I'm just wondering how Linux (RedHat 7.2) deals with dual processors,
[...]
> Does linux just take care of 2 proccessors or does the code have to be
> compatable?

If you are using a non threaded mod_perl, which is the case with

- mod_perl 1.0
- mod_perl w/ prefork mpm and you don't spawn your own threads, which you can.

then your code will work all the same.

The only difference is that if your code had any race conditions, chances are 
higher that you will hit them on a machine with more than one CPU.
On race conditions see:
http://perl.apache.org/docs/1.0/guide/debug.html#Critical_Section

If you use mod_perl 2.0 w/ threaded mpm, your code and all libs that you use 
have to be re-entrant and thread-safe, no matter whether you are using a 
single- or multi-processor machine. Again if you code does have thread related 
problems, you are more likely to see them on an SMP machine.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Dual Processors & Mod Perl

Posted by si...@siberian.org.
I have have had about 50 dual CPU/1GB ram boxes running a 
combo of linux/freebsd over the least few years (20 
currently). All running modperl/apache.

I always go Dual-CPU. Its not that pricey. We have had no 
SMP problems at all  and I think it performs much better, 
about 30% higher transaction rate. To me hte RAM is more 
important then the CPU dualism.

But in general on a high volume system you are probably 
going to be more bound by Disk I/O etc then CPU.

Our code base is pretty huge and we run more modules from 
CPAN then I can count including all the XML stuff ( 
LibXML, SOAP etc etc etc ).

John-

On Thu, 13 Mar 2003 15:15:34 -0000
  "Jim Morrison [Mailing-Lists]" <ju...@mediaisotope.com> 
wrote:
>Hey ho,
>
>Sorry if this is an FAQ or a little OT..
>
>We're thinking of moving a couple of servers and one of 
>the
>possibilities is a dual PIII box (Compaq AFAIK, probably 
>pretty standard
>rack box)
>
>I'm just wondering how Linux (RedHat 7.2) deals with dual 
>processors,
>and whether any of the following will have problems:
>
>  - Apache & mod_perl themselves (currently use v1's 
>rather than 2's)
>  - LibXML,XSLT etc running under mod_perl
>  - A whole bunch of CPAN mods!
>
>Does linux just take care of 2 proccessors or does the 
>code have to be
>compatable?
>
>Also out of pure curiosity does it actually double the 
>capabilities of
>the machine? (The jump from our current 128Mb to 1GB of 
>RAM will - I'm
>guessing - have more of an impact ;-)
>
>
>Cheers..  
>
>
>Jimbo
>
>
>
>_____________________________
>Jim Morrison
>Technology & Development Partner
>Isotope Communications
>9 Green Park Station
>Bath, BA1 1JB, UK
>+44 (0) 1225 444 674
>http://www.mediaisotope.com/
>
>
>
>