Skip to content

Commit fd0c144

Browse files
authored
Use AS_COMPACT collocation for gcp placement groups (#2587)
* Use AS_COMPACT collocation for gcp placement groups * Revert "Use AS_COMPACT collocation for gcp placement groups" This reverts commit 12f62d2. * Use AS_COMPACT collocation for gcp placement groups
1 parent d428e74 commit fd0c144

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dstack/_internal/core/backends/gcp/compute.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,10 @@ def create_placement_group(
411411
name=placement_group.name,
412412
region=placement_group.configuration.region,
413413
group_placement_policy=compute_v1.ResourcePolicyGroupPlacementPolicy(
414-
availability_domain_count=1,
415-
collocation="COLLOCATED",
414+
# GCP documents only collocation="COLLOCATED"
415+
# but collocation="AS_COMPACT" actually places VMs on the same host
416+
# and improves networking performance. Discovered with Gemini.
417+
collocation="AS_COMPACT",
416418
),
417419
)
418420
self.resource_policies_client.insert(

0 commit comments

Comments
 (0)