Skip to content

Conversation

@zetxqx
Copy link
Contributor

@zetxqx zetxqx commented Oct 18, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:
This change introduces the ability to configure the numGPUBlocks for the approximate prefix cache.

Key changes:

  • The indexer now considers numOfGPUBlocks from the server's metrics when creating a new LRU cache. This allows the cache size to be dynamically adjusted based on the server's capacity.
  • If numOfGPUBlocks is not available, a default LRU size is used.
  • The Add method in the indexer now accepts a Server struct, which includes both the ServerID and numOfGPUBlocks.

Which issue(s) this PR fixes:

Fixes partially #1304
Fixes #1512

Does this PR introduce a user-facing change?:

feat: configure LRUCacheSize using the numGPUBlocks for approximate prefix cache scorer

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 18, 2025
@netlify
Copy link

netlify bot commented Oct 18, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 920ac60
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/68f2fcd7be892c0008e5c1c8
😎 Deploy Preview https://deploy-preview-1748--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 18, 2025
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 18, 2025
@zetxqx
Copy link
Contributor Author

zetxqx commented Oct 18, 2025

/assign @liu-cong

@liu-cong
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 28, 2025
@zetxqx
Copy link
Contributor Author

zetxqx commented Nov 5, 2025

cc: @kfswain @ahg-g @nirrozenbaum can you take a look for the approval?

@ahg-g
Copy link
Contributor

ahg-g commented Nov 5, 2025

Will this work with sglang? and generally, will this introduce a regression if the model server doesn't emit this metric?

@liu-cong
Copy link
Contributor

liu-cong commented Nov 5, 2025

Will this work with sglang? and generally, will this introduce a regression if the model server doesn't emit this metric?

If metrics is not available, the default configuration will continue to be used (current behavior), so no regression.

@ahg-g
Copy link
Contributor

ahg-g commented Nov 5, 2025

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, zetxqx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2025
@k8s-ci-robot k8s-ci-robot merged commit ea8b4c3 into kubernetes-sigs:main Nov 5, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-configure prefix-cache-scorer parameters from engine metrics

4 participants