Score:0

Optimal number of Start-JobThread simultaneously

cn flag

How do I calculate the optimal number of Powershell ThreadJobs? I have a script that hands out jobs to multiple servers but these servers do not have the same number of CPU cores and RAM always. Is there some equation for dynamically calculating this optimal number to set as the ThrottleLimit? The tasks are not very RAM or CPU intensive but it seems like powershell is always drastically slowing down when reaching above a thousand or so jobs.

br flag
test it on 2 systems with the same RAM but different CPU counts ... then test it on the reverse. once you have the data for that chunk of code on your systems, use it to calc the ratio you want to use. ///// the reason this is so VERY vague is that "it depends" is oh-so-very-true. [*grin*]
Score:0
jp flag

Such things can't easily be calculated. You have to tune it based on previous runs until it's (mostly) optimized.

Tuning consist of running a number a test setups with a set of config params that will affect the outcome and then deciding on the most effective one measured to use.

Vaibhav Panmand avatar
cn flag
Can you please add some more description with your answer like some common practices for tuning.
Dennis avatar
jp flag
Edit: Elaborated a bit on tuning methodology.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.