Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Simultaneous system() calls

by Roger (Parson)
on Feb 18, 2004 at 03:07 UTC ( [id://329824]=note: print w/replies, xml ) Need Help??


in reply to Simultaneous system() calls

One question - how many processors have you got in your box? If you have one processor only, I don't see how forking can improve the performance and make everything finish quicker.

Replies are listed 'Best First'.
Re: Re: Simultaneous system() calls
by BrowserUk (Patriarch) on Feb 18, 2004 at 12:55 UTC

    The answer to that depends very much on whether the programs in question use IO of some form.

    If they do, then one program can be utilising the processor whilst others are waiting for IO to complete.

    The time between clicking the link in your browser and the page starting to render on your screen. 2 to 10 seconds depending, is cpu dead-time that can be utilised by other programs. It's the extreme example, but even the delay on reading from a file--moving the head to the right track and then waiting for the disk to rotate into the right place--is often several hundreds or thousands of clock cycles that can be utilised by other processes. Caching complicates things of course.

Re: Re: Simultaneous system() calls
by Sprad (Hermit) on Feb 19, 2004 at 16:37 UTC
    In this particular case, the processes I'm launching are network processes. They send a request to a remote server and then wait for a response. The response might take as long as an hour to come, but there's no processing being done locally while this happens. So launching them in parallel can shave off as much as two hours from runtime.

    ---
    A fair fight is a sign of poor planning.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://329824]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found