Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-Parallel skips processing some objects when throttle > 1 #68

Open
VickyWinner opened this issue Jul 12, 2019 · 2 comments
Open

Comments

@VickyWinner
Copy link

I am processing large objects and I would like Invoke-Parallel to push 1000 threads at a time. The job is done for only 400+ objects. But when I change the throttle to 1, all the objects are processed. Is there any MAX for throttle?

$all = Get-Content $TextFilePath
$a = Invoke-Parallel -InputObject $all -throttle 1000 -ImportVariables -EA SilentlyContinue -runspaceTimeout 30 -ScriptBlock

@sheldonhull
Copy link

The code example would mean 1000 throttle would be 1000 running at the same time, so if you have 400 it would do them simultaneously?

@amolsp777
Copy link

I am also facing similar issue.
I am trying to fetch servers information using scriptblock and give InputObject as 1000 around servers.
It is working fine but at the end in output some time it gives me Output for 600 and sometimes 400.
Not sure how Throttle and RunspaceTimeout combination works.

$RUNParallel = Invoke-Parallel -InputObject $Servers -Throttle 15 -RunspaceTimeout 70 -ScriptBlock $ServerCheckBlock

If we use Throttle as 1 then it is as similar as ForEach Loop one by one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants