Skip to content

fix(job): set explicit CPU and memory requests on pathways-proxy and pathways-rm - #6527

Merged
Neelabh94 merged 1 commit into
GoogleCloudPlatform:developfrom
Neelabh94:fix/pathways-proxy-rm-requests
Oct 20, 2026
Merged

Neelabh94 merged 1 commit into
GoogleCloudPlatform:developfrom
Neelabh94:fix/pathways-proxy-rm-requests

Conversation

@Neelabh94

Copy link
Copy Markdown
Contributor

Summary

In pkg/orchestrator/gke/templates/pathways_jobset.tmpl, pathways-proxy and pathways-rm previously specified resources.limits (16 CPU / 100Gi and 8 CPU / 32Gi) without an explicit resources.requests block. Because Kubernetes defaults requests = limits when requests are omitted, every Pathways head pod reserved 24 CPU and 132Gi for the two sidecars alone (26 CPU and 140Gi total with workload-container), blocking scheduling on smaller CPU head node pools and over-reserving Kueue CPU and memory quota.

This change adds explicit requests to pathways-proxy (cpu: "8", memory: "32Gi") and pathways-rm (cpu: "2", memory: "8Gi") while keeping their existing limits (16 CPU / 100Gi and 8 CPU / 32Gi), reducing head pod requests to 12 CPU / 48Gi (10 CPU / 40Gi in headless mode) while preserving sidecar burst capacity.

Testing

  • Updated TestGeneratePathwaysManifest_HeadContainerResources in pkg/orchestrator/gke/manifest_generator_test.go to verify both requests and limits on pathways-proxy and pathways-rm across default and headless modes (KUBECONFIG=/dev/null go test -race -count=1 ./pkg/orchestrator/gke/...).

…pathways-rm

In pkg/orchestrator/gke/templates/pathways_jobset.tmpl, pathways-proxy and pathways-rm previously specified resources.limits (16 CPU / 100Gi and 8 CPU / 32Gi) without a resources.requests block. Because Kubernetes defaults requests = limits when requests are omitted, every Pathways head pod reserved 24 CPU and 132Gi for the two sidecars alone (26 CPU and 140Gi total with workload-container), blocking scheduling on smaller CPU head node pools and over-reserving Kueue CPU and memory quota.

Set explicit requests on pathways-proxy (cpu: "8", memory: "32Gi") and pathways-rm (cpu: "2", memory: "8Gi") while keeping their existing limits, reducing head pod requests to 12 CPU / 48Gi (10 CPU / 40Gi in headless mode) while preserving sidecar burst capacity.
@Neelabh94 Neelabh94 added the release-bugfix Added to release notes under the "Bug fixes" heading. label Oct 19, 2026
@Neelabh94 Neelabh94 self-assigned this Oct 19, 2026
@Neelabh94
Neelabh94 marked this pull request as ready for review October 19, 2026 16:17
@Neelabh94
Neelabh94 requested a review from a team as a code owner October 19, 2026 16:17
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where missing explicit resource requests for sidecar containers resulted in inefficient cluster resource allocation. By defining specific request values, the change reduces the overall footprint of head pods, improving scheduling flexibility and quota management while preserving necessary burst capacity for the sidecars.

Highlights

  • Resource Optimization: Added explicit CPU and memory requests to the pathways-proxy and pathways-rm sidecar containers to prevent Kubernetes from defaulting requests to match limits, which previously caused significant over-reservation.
  • Test Coverage: Updated unit tests in the manifest generator to ensure that both requests and limits are correctly applied across default and headless deployment modes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the GKE pathways jobset template to specify resource requests (CPU and memory) alongside the existing resource limits for the pathways containers. Additionally, the corresponding unit tests in manifest_generator_test.go have been updated to reflect and verify these changes. I have no feedback to provide as the changes are correct and properly tested.

@agrawalkhushi18 agrawalkhushi18 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.

LGTM

@agrawalkhushi18
agrawalkhushi18 enabled auto-merge (squash) October 20, 2026 17:08
@Neelabh94
Neelabh94 disabled auto-merge October 20, 2026 17:17
@Neelabh94
Neelabh94 merged commit 872b5a0 into GoogleCloudPlatform:develop Oct 20, 2026
33 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-bugfix Added to release notes under the "Bug fixes" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants