Skip to content

Add Kubernetes rightsizing test workloads - #129

Open
zroubalik wants to merge 5 commits into
kedify:mainfrom
zroubalik:rightsizing-test-workloads
Open

zroubalik wants to merge 5 commits into
kedify:mainfrom
zroubalik:rightsizing-test-workloads

Conversation

@zroubalik

@zroubalik zroubalik commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a vendor-neutral rightsizing lab under test-data/rightsizing using standard Kubernetes APIs and two Kustomize configurations.
  • Reuse the Kedify load-generator for steady load, throttled and unthrottled bursts, startup spikes, and asymmetric multi-container sizing.
  • Exercise HPA minimum and maximum behavior, missing resources, bounded memory growth, short jobs, intentional OOM, a disruption budget, and a Pending scheduling case.
  • Add an opt-in NVIDIA vLLM fixture and a bounded concurrent load job for queueing, throughput, latency, and GPU telemetry.

Verification

  • Rendered both Kustomize configurations and ran server-side dry-run on AKS.
  • Confirmed CPU workloads roll out, both HPA boundaries are reached, the short job completes, the intentional memory job is OOMKilled, the disruption budget allows zero voluntary evictions, and the invalid selector remains Pending.
  • Verified the paired CPU workloads produce different CFS throttling signals and the startup workload returns to its low steady-state resource usage.
  • Booted OPT-125M with vLLM on an A100 and confirmed successful completions, real queueing, and pod-attributed GPU/VRAM counters.
  • Completed the three-minute GPU load run with 1,884 successful requests, zero failed requests, and 0.769 s p95 end-to-end latency in this lab run.

@zroubalik
zroubalik requested a review from a team as a code owner November 18, 2026 20:25
Copilot AI balanced review requested due to automatic review settings November 18, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The comparison workload uses a 660-second idle duration instead of 600 seconds, changing burst frequency and load proportions so recommendation differences cannot be attributed solely to CPU throttling.

1 open issue
What changed in this PR

Adds a vendor-neutral Kubernetes rightsizing lab using the existing load-generator sample, with optional GPU inference for comparing resource recommendations.

Changes:

  • Adds steady, throttled, bursty, and asymmetric multi-container CPU workloads.
  • Adds an opt-in NVIDIA vLLM fixture, initially scaled to zero.
  • Documents deployment, resource observation, and consistent recommendation comparisons.
File Description
test-data/​rightsizing/​README.md Documents lab setup, workload signals, and comparison guidance.
test-data/​rightsizing/​gpu/​kustomization.yaml Configures GPU resources and pins the vLLM image digest.
test-data/​rightsizing/​gpu/​inference.yaml Defines the GPU namespace, inference Deployment, and Service.
test-data/​rightsizing/​cpu/​workloads.yaml Defines four CPU and memory rightsizing workloads.
test-data/​rightsizing/​cpu/​namespace.yaml Creates the CPU lab namespace.
test-data/​rightsizing/​cpu/​kustomization.yaml Assembles CPU resources and pins the load-generator image digest.
test-data/​README.md Links to the rightsizing lab.

Review effort: Balanced

- name: BASELINE_MEMORY_MIB
value: "96"
- name: SCHEDULE_JSON
value: '{"loop":true,"steps":[{"profile":"idle","durationSeconds":660},{"profile":"high","durationSeconds":300}]}'
Copilot AI balanced review requested due to automatic review settings November 18, 2026 20:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Mismatched CPU workload schedules confound throttling comparisons, and uncaught transport errors can prevent the GPU benchmark from producing its aggregate JSON report.

2 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Match the comparison fixture’s repeating schedule

test-data/​rightsizing/​cpu/​workloads.yaml:115

The comparison fixture uses a different repeating schedule from cpu-throttled: 660 seconds idle plus 300 seconds high, versus 600 plus 300. This changes the burst duty cycle from 33.3% to 31.25%, so whole-window usage and recommendations differ for reasons other than throttling. Match the schedules so the CPU limit is the controlled difference.

Review effort: Balanced

with urlopen(request, timeout=15) as response:
generated_tokens += json.load(response)["usage"]["completion_tokens"]
latencies.append(time.monotonic() - started)
except (URLError, TimeoutError, ValueError, KeyError) as error:
Copilot AI balanced review requested due to automatic review settings November 18, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unhandled interrupted HTTP responses can abort the benchmark without a summary, while mismatched CPU fixture schedules prevent isolating the effects of throttling.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 18, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Uncaught dropped-connection and truncated-response exceptions can abort the benchmark before it produces aggregate throughput, latency, and failure summaries.

2 open issues

Review effort: Balanced

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 12:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Uncaught HTTP read and connection failures can propagate through executor.map, aborting the benchmark and discarding collected results instead of counting failed requests and emitting the JSON summary.

2 open issues

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants