in reply to require sugesstions for writing a perl script
If it's either CPU, harddisk access or database access that causes the slowness, then I would recommend against doing hem in parallel. 2 disk simultaneous hard disk accesses on the same disk will actually be slower than doing them one at a time, because the disk head has to constantly switch between the head positions for the 2 files. Likewise, doing 2 CPU intensive processes in parallel on the same CPU will not be faster than doing them one at a time, it'll only use more RAM.
If you're waiting for a file download to complete, you could have it do a few at a time. Also, if it's a combination of the above factors, you could get a speed gain doing them in parallel, for example one process could be accessing the disk while another is doing a computation.
Thus: do a benchmark test, limit the number of parallel processes, and see if it is actually faster, or not.
|
---|