startnet.cmd: robocopy /MT:16 + /J for faster waxtrace stage

Three speed bumps on the waxtrace WinPE stage:
- /MT:16 on the bundle robocopy (was single-thread). Parallelizes the
  small-files-many-of-them part (config + backups + prereqs).
- /J on the single-file FTPak ISO cherry-pick. Unbuffered I/O is
  measurably faster than xcopy on 2 GB-ish files over SMB; xcopy goes
  through the buffered I/O path which double-copies in kernel.
- Swap the FTPak ISO cherry-pick from xcopy to robocopy single-file
  syntax (source dir + dest dir + filename pattern) so we can use /J.

No behavioral change otherwise. Backup ZIP cherry-pick stays on xcopy
(it's ~1 MB, doesn't benefit from /J).
This commit is contained in:
cproudlock
2026-05-24 14:09:06 -04:00
parent 8e1f81b942
commit f95d305cca

View File

@@ -499,7 +499,7 @@ REM matched FTPak ISO gets cherry-picked below into the same target dir.
REM /NFL/NDL keep the listing manageable; output left visible (no >NUL) so REM /NFL/NDL keep the listing manageable; output left visible (no >NUL) so
REM any failure is debuggable from the install log. robocopy exit codes REM any failure is debuggable from the install log. robocopy exit codes
REM 0-7 are "OK" (per Microsoft); 8+ is real failure. REM 0-7 are "OK" (per Microsoft); 8+ is real failure.
robocopy "Y:\installers-post\waxtrace" "W:\WaxTrace-Install" /E /XD formtracepak /R:1 /W:1 /NFL /NDL robocopy "Y:\installers-post\waxtrace" "W:\WaxTrace-Install" /E /XD formtracepak /MT:16 /R:1 /W:1 /NFL /NDL
if errorlevel 8 echo WARNING: robocopy exit %ERRORLEVEL% - some files may not have copied. if errorlevel 8 echo WARNING: robocopy exit %ERRORLEVEL% - some files may not have copied.
mkdir W:\WaxTrace-Install\formtracepak 2>NUL mkdir W:\WaxTrace-Install\formtracepak 2>NUL
echo Staged WaxTrace bootstrap minus formtracepak\ to W:\WaxTrace-Install. echo Staged WaxTrace bootstrap minus formtracepak\ to W:\WaxTrace-Install.
@@ -516,7 +516,10 @@ set WTVER=
if exist W:\Enrollment\waxtrace\version.txt set /p WTVER=<W:\Enrollment\waxtrace\version.txt if exist W:\Enrollment\waxtrace\version.txt set /p WTVER=<W:\Enrollment\waxtrace\version.txt
if not "%WTVER%"=="" ( if not "%WTVER%"=="" (
if exist "Y:\installers-post\waxtrace\formtracepak\FORMTRACEPAK-V%WTVER%.iso" ( if exist "Y:\installers-post\waxtrace\formtracepak\FORMTRACEPAK-V%WTVER%.iso" (
xcopy /Y "Y:\installers-post\waxtrace\formtracepak\FORMTRACEPAK-V%WTVER%.iso" "W:\WaxTrace-Install\formtracepak\" REM robocopy /J = unbuffered I/O, meaningfully faster than xcopy on
REM 2 GB FTPak ISOs over SMB. Single-file syntax: source dir, dest
REM dir, file pattern.
robocopy "Y:\installers-post\waxtrace\formtracepak" "W:\WaxTrace-Install\formtracepak" "FORMTRACEPAK-V%WTVER%.iso" /J /R:1 /W:1 /NFL /NDL
echo Staged FormTracePak V%WTVER%.iso for %MACHINENUM%. echo Staged FormTracePak V%WTVER%.iso for %MACHINENUM%.
) else ( ) else (
echo WARNING: No FORMTRACEPAK-V%WTVER%.iso on share for %MACHINENUM% - 09-Setup-WaxAndTrace will abort cleanly with the version-mismatch error. echo WARNING: No FORMTRACEPAK-V%WTVER%.iso on share for %MACHINENUM% - 09-Setup-WaxAndTrace will abort cleanly with the version-mismatch error.