locked
Robocopy multithread option not working as expected. RRS feed

  • Question

  • Greetings. I'm a DBA so I never use this particular forum -- feel free to move if in the wrong spot.

    I'm attempting to use the /MT switch in Robocopy and it doesn't appear to be working. I kicked off 3 file transfers all at the same time from different command prompts. One was /MT:1, one was /MT:8, and the last was /MT:16

    Looking in Task Manager, the thread count for robocopy.exe is 4 for all 3 of them.

    This is on windows server 2016.

    Ideas?


    Thanks in advance! ChrisRDBA

    • Moved by Bill_Stewart Tuesday, October 13, 2020 9:38 PM Off-topic
    Sunday, October 4, 2020 1:28 AM

Answers

  • Why would you expect more than four threads with only four files.   Files can only be copied contiguously.  A file cannot be written in parts.  This is basic Windows and has nothing to do with PowerShell or with threading.

    If you have a basket full of apples would you cut them into pieces to transfer them to a new basket?  Only if you want applesauce.


    \_(ツ)_/

    • Marked as answer by ChrisRDBA Monday, October 5, 2020 10:35 PM
    Monday, October 5, 2020 4:44 AM

All replies

  • The running number of threads will be the number of cores/hyperthreads.  The number sets the maximum number of threads available to be scheduled.  Usually, as longs as a free thread is available when needed the number will be the maximum number required until a free thread is not available..  If you have a lot of small files the number of threads may show far fewer than requested.

    Larger numbers of threads are only useful when copying many large files.


    \_(ツ)_/

    Sunday, October 4, 2020 3:53 AM
  • The running number of threads will be the number of cores/hyperthreads.  The number sets the maximum number of threads available to be scheduled.  Usually, as longs as a free thread is available when needed the number will be the maximum number required until a free thread is not available..  If you have a lot of small files the number of threads may show far fewer than requested.

    Larger numbers of threads are only useful when copying many large files.


    \_(ツ)_/

    I have 80 cores on this box. I'm copying four files, at 45 GB each. However, they're each in separate locations on the source. Can /MT not be used in this scenario? Would they all need to be coming from same folder to take advantage of this?

    Thanks in advance! ChrisRDBA

    Monday, October 5, 2020 4:36 AM
  • Why would you expect more than four threads with only four files.   Files can only be copied contiguously.  A file cannot be written in parts.  This is basic Windows and has nothing to do with PowerShell or with threading.

    If you have a basket full of apples would you cut them into pieces to transfer them to a new basket?  Only if you want applesauce.


    \_(ツ)_/

    • Marked as answer by ChrisRDBA Monday, October 5, 2020 10:35 PM
    Monday, October 5, 2020 4:44 AM