Skip to content

Commit

Permalink
cpuCoresThrottleLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefajers authored Nov 6, 2023
1 parent ee791f3 commit 8c0cfaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/Initialize-AzOpsEnvironment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}

# Adjust ThrottleLimit from previously default 10 to 5 if system has less than 2 cores
$cpuCores = if ($IsWindows) { $env:NUMBER_OF_PROCESSORS } else { Invoke-AzOpsNativeCommand -ScriptBlock { nproc --all } -IgnoreExitcode }
[int]$cpuCores = if ($IsWindows) { $env:NUMBER_OF_PROCESSORS } else { Invoke-AzOpsNativeCommand -ScriptBlock { nproc --all } -IgnoreExitcode }
$throttleLimit = (Get-PSFConfig -Module AzOps -Name Core.ThrottleLimit).Value
if (-not[string]::IsNullOrEmpty($cpuCores) -and $cpuCores -le 2 -and $throttleLimit -gt 5) {
Write-PSFMessage -Level Warning -String 'Initialize-AzOpsEnvironment.ThrottleLimit.Adjustment' -StringValues $throttleLimit, $cpuCores
Expand Down

0 comments on commit 8c0cfaa

Please sign in to comment.