diff --git a/otelcollector/build/windows/Dockerfile b/otelcollector/build/windows/Dockerfile index 17b813b3a..544b4cafa 100644 --- a/otelcollector/build/windows/Dockerfile +++ b/otelcollector/build/windows/Dockerfile @@ -6,6 +6,8 @@ LABEL maintainer="ciprometheus@microsoft.com" 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 diff --git a/otelcollector/build/windows/scripts/main.ps1 b/otelcollector/build/windows/scripts/main.ps1 index c8b4f22da..197cfc3a6 100644 --- a/otelcollector/build/windows/scripts/main.ps1 +++ b/otelcollector/build/windows/scripts/main.ps1 @@ -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")