Add argument --prefetch-max-in-flight to fix hardcode#2789
Add argument --prefetch-max-in-flight to fix hardcode#2789maobaolong merged 3 commits intoLMCache:devfrom
Conversation
Summary of ChangesHello, 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 enhances the flexibility of the LMCache system by externalizing the control over prefetch concurrency. By introducing a command-line argument and a corresponding configuration field, it allows administrators to dynamically adjust the maximum number of in-flight prefetch requests, moving away from a fixed, hardcoded limit. This change provides better operational control and resource management for distributed storage operations. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe 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
Customization To customize 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a command-line argument --prefetch-max-in-flight to make the maximum number of in-flight prefetch requests configurable, removing a hardcoded value. The changes are well-implemented across the configuration, storage manager, and prefetch controller. My feedback focuses on improving the naming consistency of the new argument to align with existing patterns in the codebase.
|
Please update the docs in |
Signed-off-by: baoloongmao <baoloongmao@tencent.com> LMCache#2789
|
@maobaolong can we add some docs in |
|
@ApostaC Sure, thanks for remind me. |
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
a43ba63 to
88039a4
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
* Add argument --prefetch-max-in-flight to fix hardcode Signed-off-by: baoloongmao <baoloongmao@tencent.com> * add l2 prefix Signed-off-by: baoloongmao <baoloongmao@tencent.com> --------- Signed-off-by: baoloongmao <baoloongmao@tencent.com>
* Add argument --prefetch-max-in-flight to fix hardcode Signed-off-by: baoloongmao <baoloongmao@tencent.com> * add l2 prefix Signed-off-by: baoloongmao <baoloongmao@tencent.com> --------- Signed-off-by: baoloongmao <baoloongmao@tencent.com>

What this PR does / why we need it:
Special notes for your reviewers:
If applicable:
Note
Low Risk
Low risk: exposes an existing prefetch concurrency limit as a CLI/config option and wires it through to
PrefetchController, with default behavior unchanged. Main risk is operational misconfiguration (setting the limit too high could increase L1 memory pressure).Overview
Adds a new
--l2-prefetch-max-in-flightCLI flag (default8) to control how many concurrent L2 prefetch/load requests thePrefetchControllercan issue, replacing the previously fixed limit.Wires the new setting through
StorageManagerConfigintoStorageManagerwhen constructingPrefetchController, and updates multiprocess docs/examples to document the flag and its memory/throughput tradeoff.Written by Cursor Bugbot for commit 88039a4. This will update automatically on new commits. Configure here.