[Israel.pm] performance problems - Win32::Process which runs perl

guy keren choo at actcom.co.il
Tue Sep 12 17:12:30 PDT 2006


did you ask yourself, how quick windows can create processes in general,
and perl processes specifically?

write a perl script invokes perl processes (via Win32::Process) that run
a 'hello world' in succession. make it invoke as many processes as you
have records in the table, and count the total run time.

if this figure is already too high - you'll have to change your entire
approach.

by the wa, just a silly question - are you running the processes
sequentially (i.e. the 2nd process is created only after the first
process terminated), or in parallel? if the later - you're thrashing
your machine's resources.

--guy

On Tue, 2006-09-12 at 20:19 +0300, Sagiv Barhoom wrote:
> 
> Subject: performance  problems - Win32::Process which runs perl
> Date: Tuesday 12/9/2006 14:58
> From: Sagiv Barhoom <sagivba at openu.ac.il>
> To: sagivba at 012.net.il
> 
> Hi all
> I am writing an application which run on  windows 2003 server.
> The Perl is ActivePerl and I am using DBI && DBD:Oracle to connect to
> Oracle 9i DB.
> The machine is vmware 3.2GB and 1GB memory.
> 
> 
> The application  reads data from the DB and generates Perl script
> foreach record.
> 
> Then It run the created script using Win32::Process and
> Win32::Process::Info.
> I have preformance problem - the DB run easyly but the perl machine CPU
> run at 100% most of the time and can not generating  the processes fast
> enough. The memory gets to 600MB so that is not the problem.
> The DB almost does not work.
> So the only bottle neck is the CPU!
> 
> 
> When we  played with the code we noticed two interesting things:
> 1. removing some of the "use <some module>" improved the performance -
> but yet we use some of the subroutines from that modules.
> 
> 2. the processes which are created by the main process have two peaks of
> CPU at creation (and I guess the compile part) and at the exit.
> 
> Any ideas how to improve performance ?
> 
> Sשעןה
> 
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl




More information about the Perl mailing list