Multithreading Script

Welcome Forums General PowerShell Q&A Multithreading Script

Viewing 1 reply thread
  • Author
    Posts
    • #276594
      Participant
      Topics: 13
      Replies: 26
      Points: 44
      Rank: Member

      I am attempting to multithread a script and any time I increase the amount of threads, the performance of the script greatly decreases.  For example, if I set a max of 5 threads I can write 635 objects/min.  When I set to 10 threads, I can write only 361 objects/min.  I have beefed up resources on the server I am running this from and never get close to maxing out the hardware, so I know it’s not a hardware limitation.

      Here is the script:

      • This topic was modified 1 month, 2 weeks ago by kvprasoon. Reason: Code formatting https://powershell.org/forums/topic/guide-to-posting-code-2/
    • #276684
      Participant
      Topics: 13
      Replies: 26
      Points: 44
      Rank: Member

      After checking various settings and syntax, my issue is with the server that I am reading files from.  I can see that I am getting all the threads, however, I am being bottlenecked by the read speed on the server I am reading from.

      The more threads the bigger the read speed bottleneck.  Explains a lot.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.