Hi,

I propose using windows VMs instead of containers, the patch is attached. Currently, windows containers are used on the CI, but these container images are needs to get pulled on every CI run, also they are slow to run.

These VM images are created in the same way how container images are created [1].

The comparison between VMs and containers are (based on d952373a98 and with same numbers of CPU and memory):

Scheduling step:


        VS 2019
        MinGW64
VM [2]
        00:17m
        00:16m
Container [3]
        03:51m  04:28m

Execution step:


        VS 2019
        MinGW64
VM [2]
        12:16m
        07.55m
Container [3]
        26:02m  16:34m

There is more than 2x speed gain when VMs are used.

[1] https://github.com/anarazel/pg-vm-images/blob/main/packer/windows.pkr.hcl
[2] https://cirrus-ci.com/build/4720774045499392
[3] https://cirrus-ci.com/build/5468256027279360

Regards,
Nazir Bilal Yavuz
Microsoft
From 6981319d054f0736e474bc315ab094094d159979 Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <byavu...@gmail.com>
Date: Tue, 10 Jan 2023 13:58:39 +0300
Subject: [PATCH] Use windows VMs instead of windows containers

---
 .cirrus.yml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 69837bcd5a..5700b8cd66 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -549,8 +549,10 @@ task:
   depends_on: SanityCheck
   only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || 
$CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
 
-  windows_container:
-    image: $CONTAINER_REPO/windows_ci_vs_2019:latest
+  compute_engine_instance:
+    image_project: $IMAGE_PROJECT
+    image: family/pg-ci-windows-ci-vs-2019
+    platform: windows
     cpu: $CPUS
     memory: 4G
 
@@ -589,8 +591,10 @@ task:
   # otherwise it'll be sorted before other tasks
   depends_on: SanityCheck
 
-  windows_container:
-    image: $CONTAINER_REPO/windows_ci_mingw64:latest
+  compute_engine_instance:
+    image_project: $IMAGE_PROJECT
+    image: family/pg-ci-windows-ci-mingw64
+    platform: windows
     cpu: $CPUS
     memory: 4G
 
-- 
2.25.1

Reply via email to