Madhu Reddy wrote:
Hi,Are the CPU's the same speed?
When i ran perl script on multi processor
machine...
it is taking more time as than on single processor
machine....
Let me explain clearly....
I have big file (.5Gb) it has 8 million records...
my perl script will read each record and validates..
Validation includes..checking each record lenghth
etc....
When i ran this script on single processor machine
With 256MB RAM, It took 3 min to process 8 million
records...
If ran the same script on Multi processor machine
(4 CPU's and 3GB RAM), it took 6min....
Any body have idea why it is taking more time on multi processor system ?
On top of what Tanton already mentioned, there doesn't sound like anything you are doing is really compatible with a multi-processor environment. Are you using threads? fork/execs? etc. If you are running a single Perl process, no matter how many processors the machine has (assuming it doesn't do something like virtualize them into a single CPU) it won't speed up the single process. At least that is my understanding of an SMP environment (am I delusional anyone?).
Theoretically you could do something like store the whole file to memory, divide the file in x number of parts, start x processes/threads to each parse 1/x (where x is the number of cpus) worth of the file, so that each thread processes part of the file itself.
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]