Parallel execute resource tasks


#1

I have a recipe that has 4 disk tasks that each one takes about 10 minutes. I would like to execute the tasks with an & at the end to fork off the process and run them in parallel. However, I am not sure how to track that all four are complete.

I suppose, I could loop, test and sleep for a file completed at the end of each task and then continue.

Has anyone have any better suggestions for handling forked processes and tracking completion?

Thanks
Randy


#2

On Thu, Feb 16, 2012 at 3:05 PM, Van Fossan,Randy vanfossr@oclc.org wrote:

I have a recipe that has 4 disk tasks that each one takes about 10 minutes. I would like to execute the tasks with an & at the end to fork off the process and run them in parallel. However, I am not sure how to track that all four are complete.

I suppose, I could loop, test and sleep for a file completed at the end of each task and then continue.

Has anyone have any better suggestions for handling forked processes and tracking completion?

I think you should look at Aruba’s API code to see how to do this very
elegantly. essentially it uses the cmd as a key, can’t recall what
happens if the commands are identical.
If it doesn’t already handle your use case I would think it could be
easily adjusted to do so?

Would be interested in hearing your experiences.

HTH?

Thanks
Randy


πόλλ’ οἶδ ἀλώπηξ, ἀλλ’ ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://hedgehogshiatus.com


#3

On Feb 15, 2012, at 10:05 PM, Van Fossan,Randy wrote:

I have a recipe that has 4 disk tasks that each one takes about 10 minutes. I would like to execute the tasks with an & at the end to fork off the process and run them in parallel. However, I am not sure how to track that all four are complete.

I suppose, I could loop, test and sleep for a file completed at the end of each task and then continue.

Has anyone have any better suggestions for handling forked processes and tracking completion?

Doesn’t gnu parallel help track this sort of stuff?


Brad Knowles bknowles@ihiji.com
SAGE Level IV, Chef Level 0.0.1