Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: fork() and defunct children

by downer (Monk)
on Feb 12, 2008 at 04:54 UTC ( [id://667505]=note: print w/replies, xml ) Need Help??


in reply to fork() and defunct children

As a general point, why are you trying to have multiple processes write to the DB? Do you think it will be faster? I suspect that since this will be most likely disk bound (aside from the cost of building an index, which can be done after all updates are performed), having multiple processes go at this won't gain you much. maybe its ok to get rid of the confusing and have a single process do it. Otherwise, you can try writing the parts that would be forked in another script, then doing a  system(" otherScript.pl $data &") then your main script will continue while the other script does it's thing.

Replies are listed 'Best First'.
Re^2: fork() and defunct children
by Anonymous Monk on Feb 12, 2008 at 22:53 UTC
    Not write to -- read from. It won't be faster, but the children will mostly be shelling out system commands, and occasionally doing something like SHOW CREATE TABLE to the database. So the DB accesses will be few and short, while the children mostly spend time waiting for system() calls to finish.

Log In?
Username:
Password:

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

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

    No recent polls found