From cd8573664ebab62de92357c793fe2367f3401f2b Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 9 Oct 2023 14:11:40 -0400 Subject: [PATCH] Make sure only 110G mem is utilized for WINRM M58xlarge on Windows Gradle Check Runner Signed-off-by: Peter Zhu --- packer/jenkins-agent-win2019-x64-gradle-check.json | 2 +- packer/scripts/windows/winrm_max_memory.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packer/jenkins-agent-win2019-x64-gradle-check.json b/packer/jenkins-agent-win2019-x64-gradle-check.json index 5254e9f..e3ff6e1 100644 --- a/packer/jenkins-agent-win2019-x64-gradle-check.json +++ b/packer/jenkins-agent-win2019-x64-gradle-check.json @@ -68,7 +68,7 @@ { "type":"powershell", "inline": [ - "C:\\Users\\Administrator\\jenkins\\winrm_max_memory.ps1 126" + "C:\\Users\\Administrator\\jenkins\\winrm_max_memory.ps1 110" ] }, { diff --git a/packer/scripts/windows/winrm_max_memory.ps1 b/packer/scripts/windows/winrm_max_memory.ps1 index a99d984..be02dca 100644 --- a/packer/scripts/windows/winrm_max_memory.ps1 +++ b/packer/scripts/windows/winrm_max_memory.ps1 @@ -5,8 +5,8 @@ # this file be licensed under the Apache-2.0 license or a # compatible open source license. -echo "The max amount of the winrm memory must be 2GB smaller than max host memory, no less" -echo "Example: with 128GB on host, winrm must set to 126GB minimum size, else packer will fail on the EC2 internal preparation scripts" +echo "The max amount of the winrm memory is not the same on different instance type and might cause the server unresponsive upon startup" +echo "The only examples we have now is C54xlarge can have 30/32GB on WINRM, C524large 190/192GB, M58xlarge 110/128GB without failures" $memorygb = [int]$args[0] $memorygb