From 9622e25989ade75ef7469167d9558b68025d13bb Mon Sep 17 00:00:00 2001 From: Jvst Me Date: Wed, 9 Jul 2025 10:19:23 +0200 Subject: [PATCH] Switch to `e2-medium` for GCP gateways Switching from `e2-small` to `e2-medium` decreases provisioning time from about 5 minutes to about 2 minutes. The bottleneck is the snap, apt, and pip package installation, which takes too long on `e2-small`, likely because of the burstable CPU - `e2-small` comes with 0.5-2 vCPU, while `e2-medium` comes with 1-2 vCPU, depending on the burst. --- src/dstack/_internal/core/backends/gcp/compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dstack/_internal/core/backends/gcp/compute.py b/src/dstack/_internal/core/backends/gcp/compute.py index 8a03030c0d..2f0239239e 100644 --- a/src/dstack/_internal/core/backends/gcp/compute.py +++ b/src/dstack/_internal/core/backends/gcp/compute.py @@ -499,7 +499,7 @@ def create_gateway( request.instance_resource = gcp_resources.create_instance_struct( disk_size=10, image_id=_get_gateway_image_id(), - machine_type="e2-small", + machine_type="e2-medium", accelerators=[], spot=False, user_data=get_gateway_user_data(configuration.ssh_key_pub),