Robocopy multithread

What /MT robocopy multithread actually does

Robocopy can copy multiple files at once using a thread pool. You control the pool size with /MT:n where n = 1–128 (default is 8 if you don’t specify a number). Microsoft notes that multithreading improves throughput and recommends redirecting output to a log for best performance; /MT is incompatible with /IPG and /EFSRAW.

image 3
Image source: YouTube

Quick-start recipes (copy & tweak)

1) Fast local or LAN folder sync (keeps permissions & times)

robocopy "D:\Source" "\\Server\Share\Dest" /MIR /COPY:DATSO /DCOPY:DAT /MT:32 /R:5 /W:3 /XJ /NFL /NDL /NP /LOG:C:\logs\job1.log
  • /MIR mirrors (add + delete). Use with care.
  • /COPY:DATSO = Data, Attributes, Timestamps, Security (ACLs), Owner.
  • /DCOPY:DAT preserves dir attributes & times.
  • /XJ skips junctions/symlinks (avoids loops).
  • /NFL /NDL /NP trims console spam; logging helps speed with /MT.

2) Lots of huge files (VMs, ISOs)

robocopy "E:\VMs" "\\NAS\VMs" *.vhdx *.iso /E /J /MT:16 /R:3 /W:2 /TEE /LOG+:C:\logs\vm_copy.log
  • /J = unbuffered I/O (often faster for big files).

3) Millions of tiny files (code, photos)

robocopy "D:\Photos" "Z:\Photos" /E /MT:64 /R:2 /W:1 /FFT /XJ /NP /LOG:C:\logs\photos.log
  • High /MT helps small-file workloads; /FFT relaxes timestamp granularity for cross-platform shares. (General /MT behavior & limits: MS docs.)

4) “Resumeable” copy across flaky links

robocopy "C:\Data" "\\Remote\Backup" /E /ZB /MT:16 /R:5 /W:5 /LOG:C:\logs\resume.log
  • /ZB uses restartable mode, falling back to backup mode if needed. (Tip: /Z can slow some links; tune case by case.)

5) Throttle (don’t saturate the pipe)

  • You can’t use /IPG with /MT. If you must throttle, drop /MT or rate-limit at the network layer/QoS.

image 1
Image source: Spiceworks Community

How many threads should I use?

  • Start at 16–32 for most LAN jobs; 64–96 can help with mountains of small files. Going past that can cause diminishing returns or contention on slow storage/NAS CPUs. (Default 8; allowed 1–128.)

Performance switches that matter

  • /MT:n — thread count (default 8; max 128).
  • /J — unbuffered I/O; great for very large files.
  • /NOOFFLOAD — disable Windows copy offload (use if your storage offload behaves poorly).
  • /R:n /W:n — lower retries/waits (defaults are huge; set like /R:5 /W:3).
  • /LOG[:file] — redirect output; recommended with /MT for speed and clean logs.

image 2
Image source: Andy’s Tech Blog

What to avoid / common pitfalls

  • Using /IPG with /MT (not supported).
  • Mindless /MIR on the wrong path—deletes at destination. Dry-run first with /L. (General guidance.)
  • Huge /R & /W defaults; they can stall jobs for hours on one bad file. Tune them.
  • Expecting linear speedup with threads; disk/NAS/CPU and SMB limits cap gains. (Empirical testing shows diminishing returns.)
  • Console spam hurting speed with /MT; use /LOG + /NFL /NDL /NP.

Verifying success (exit codes)

Robocopy’s exit code is a bitmask (0–7 = success states; ≥8 indicates failure). Many tools treat “non-zero = error”, which is wrong for Robocopy. Adjust your scripts accordingly.

Example batch snippet:

robocopy "C:\A" "D:\B" /E /MT:32
set RC=%ERRORLEVEL%
if %RC% GEQ 8 (
  echo Robocopy failed with code %RC%
  exit /b %RC%
) else (
  echo Robocopy completed (code %RC%)
)

Logging & monitoring

  • Use /LOG:c:\logs\job.log or /LOG+ to append; pair with /TEE to also echo to screen. (Logging improves /MT performance, per docs.)

Review: When Robocopy (/MT) is the right tool

thumbs up regular

Pros

  • Rich flags for ACLs, timestamps, mirroring, retries, resume, logs.
  • Built-in, scriptable, fast for big trees (especially small files) thanks to /MT.
thumbs down regular

Cons

  • No native bandwidth cap with /MT (since /IPG conflicts).
  • Diminishing returns at high thread counts; can overwhelm slow NAS/SMB links. (Empirical tests.)
  • Syntax quirks; exit code bitmask confuses CI/backup wrappers.

Good alternatives

  • For one-shot local copies of very large files: plain Explorer or Copy-Item -ToSession (PowerShell Remoting) sometimes ties.
  • For scheduled backups with versioning: use backup software; Robocopy doesn’t version files.
  • For WAN/Cloud: use tools that handle latency/compression/delta-sync.

Handy cheatsheet

  • Mirror + ACLs (safe-ish defaults)
    /MIR /COPY:DATSO /DCOPY:DAT /R:5 /W:3 /XJ /MT:32 /LOG:job.log
  • Big files
    /E /J /MT:16 /R:3 /W:2 /LOG:big.log
  • Many tiny files
    /E /MT:64 /NFL /NDL /NP /LOG:tiny.log
  • Dry-run
    ... /L /UNILOG:c:\logs\whatwouldhappen.log (no changes; show actions)

Further reading (solid, up-to-date sources)

  • Microsoft Learn: full Robocopy reference and /MT caveats (defaults, incompatibilities, logging tip).
  • PDQ’s “Hitchhiker’s Guide”: modern switch coverage with examples.
  • Petri’s “Complete Guide to Robocopy” (updated 2025): broader overview & scenarios.
  • SS64 exit codes table (indicates 0–7 = success).
  • Benchmarks & thread scaling discussion (why more threads ≠ always faster).

FAQs

What does /MT do in Robocopy?

It enables multithreaded copying, allowing Robocopy to copy multiple files simultaneously instead of one at a time. This can dramatically increase speed—especially when copying many small files.

What’s the default number of threads?

/MT defaults to 8 threads if you don’t specify a number. You can set /MT:n where n ranges from 1 to 128.

Is /MT available on all Windows versions?

/MT was introduced in Windows 7 / Server 2008 R2 and is available in all newer versions of Windows (10, 11, Server 2012+).

How many threads should I use?

8–16 threads → Good default for most jobs.
32–64 threads → Best for lots of small files.
16–32 threads → Best for large files or network drives.
Higher isn’t always better — performance can drop if disk or network can’t keep up.

Does /MT make copying over networks faster?

Usually yes, but only if the source/destination drives and network bandwidth can handle parallel transfers.

Can I use /MT with /IPG (inter-packet gap)?

No. /IPG (which throttles network traffic) is incompatible with /MT.

Can I use /MT with /EFSRAW?

No. Multithreading doesn’t work with encrypted file system raw copies.

READ ALSO: How to turn off hardware acceleration chrome?

Leave a Reply