Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow performance when downloading (restore) #845

Open
MatsBEkman opened this issue Dec 12, 2023 · 0 comments
Open

Slow performance when downloading (restore) #845

MatsBEkman opened this issue Dec 12, 2023 · 0 comments
Labels

Comments

@MatsBEkman
Copy link
Contributor

Current Behavior

The performance when using
Start-RubrikDownload.ps1
Start-RubrikVMDownload.ps1
is really slow because of the way Invoke-WebRequest was implemented
It is missing a parameter to make it fast
$ProgressPreference = 'SilentlyContinue'
need to proceed the command
We are using Powershell version 5.1 that is included in this server version

Expected Behavior

By adding this parameter before
Invoke-WebRequest @WebRequestSplat
In both of the above scripts we speed up the download time by a factor of at least 40

Steps to Reproduce

Use the scripts to download a large file and measure the time (PS version 5.1 included in the server running)
Modify the scripts as follows
Original script in both cases above have at the end

if (Test-PowerShellSix) {
  $WebRequestSplat.SkipCertificateCheck = $true
  Invoke-WebRequest @WebRequestSplat
} else {
  Invoke-WebRequest @WebRequestSplat
}

Changing them to

if (Test-PowerShellSix) {
  $WebRequestSplat.SkipCertificateCheck = $true
  $ProgressPreference = 'SilentlyContinue'
  Invoke-WebRequest @WebRequestSplat
} else {
  $ProgressPreference = 'SilentlyContinue'
  Invoke-WebRequest @WebRequestSplat
}

Run the scripts again and measure the time

Context

No response

Failure Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant