Skip to content

Commit bc46723

Browse files
hubatishcopybara-github
authored andcommitted
Decrease max wait time to 1h
PiperOrigin-RevId: 830464291
1 parent 0ce1eab commit bc46723

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

perfkitbenchmarker/linux_benchmarks/kubernetes_scale_benchmark.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def _GetScaleTimeout() -> int:
113113
if virtual_machine.GPU_COUNT.value:
114114
base_timeout = 60 * 30 # 30 minutes
115115
proposed_timeout = base_timeout + per_pod_timeout
116-
max_timeout = 2 * 60 * 60 # 2 hours
116+
max_timeout = 60 * 60 # 1 hour
117117
return min(proposed_timeout, max_timeout)
118118

119119

@@ -178,6 +178,8 @@ def ScaleUpPods(
178178

179179
# Request X new pods via YAML apply.
180180
max_wait_time = _GetScaleTimeout()
181+
resource_timeout = max_wait_time + 60 * 5 # 5 minutes after waiting to avoid
182+
# pod delete events from polluting data collection.
181183
resource_names = cluster.ApplyManifest(
182184
MANIFEST_TEMPLATE,
183185
Name='kubernetes-scaleup',
@@ -189,7 +191,7 @@ def ScaleUpPods(
189191
Command=command,
190192
EphemeralStorageRequest='10Mi',
191193
RolloutTimeout=max_wait_time,
192-
PodTimeout=max_wait_time + 60,
194+
PodTimeout=resource_timeout,
193195
NodeSelectors=cluster.GetNodeSelectors(
194196
cluster.default_nodepool.machine_type
195197
),

0 commit comments

Comments
 (0)