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

fix: set threadpool unfair semaphore spin limit in dockerfile for windows #694

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions otelcollector/build/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ LABEL maintainer="[email protected]"
ENV OS_TYPE "windows"
ENV MONITORING_DATA_DIRECTORY "C:\\opt\\genevamonitoringagent\\datadirectory"
ENV MONITORING_MCS_MODE "1"
# Set unfair semaphore wait for better initial CPU performance
ENV COMPlus_ThreadPool_UnfairSemaphoreSpinLimit 0
ENV tmpdir /opt/

# Below is for ContainerInsightsPrometheusCollector-Prod AppInsights Resource
Expand Down
2 changes: 0 additions & 2 deletions otelcollector/build/windows/scripts/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
$me_config_file = '/opt/metricextension/me_ds_win.config'

function Set-EnvironmentVariablesAndConfigParser {
# Set unfair semaphore wait for better initial CPU performance
Set-ProcessAndMachineEnvVariables "COMPlus_ThreadPool_UnfairSemaphoreSpinLimit" "0"
# Set windows 2019 or 2022 version (Microsoft Windows Server 2019 Datacenter or Microsoft Windows Server 2022 Datacenter)
$windowsVersion = (Get-WmiObject -class Win32_OperatingSystem).Caption
[System.Environment]::SetEnvironmentVariable("windowsVersion", $windowsVersion, "Process")
Expand Down