feat(gds): add multipath KV-cache offloading support#2817
feat(gds): add multipath KV-cache offloading support#2817DongDongJu merged 1 commit intoLMCache:devfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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 introduces multi-path support for the GDS backend, allowing users to distribute KV cache I/O across multiple NVMe drives. This is achieved by parsing comma-separated paths and selecting a path per GPU worker based on its device ID. The changes include code modifications to handle multiple paths, documentation updates, and new tests to ensure the functionality works as expected. Highlights
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. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully implements multi-path KV-cache offloading support for GDS, enabling distribution of I/O across multiple NVMe drives. The logic for parsing comma-separated paths and selecting a path per GPU worker using device_id % num_paths is correctly implemented. Documentation has been updated to reflect this new feature, and a comprehensive set of unit tests ensures the correctness and backward compatibility of the multi-path functionality, including path parsing, GPU affinity, and directory creation. The changes are robust and well-tested.
DongDongJu
left a comment
There was a problem hiding this comment.
Hello @glimchb, Thanks for the contributions.
In distributed workloads especially when CUDA_VISIBLE_DEVICES is set, this index based can be makes the unbalanced distribution in global manner.
Maybe UUID or config-based affinity is better idea for future?
And could you modify the read path can support this one too?
I will take a look one by one your patch series.
Lets move on.
0a0761e to
ec785ff
Compare
thanks @DongDongJu. I added comments, read and write works and tested. I added a bit more clarity. Regarding other sharding/affinity strategies, that is exactly our next patch after this one is going in. |
46c53e6 to
88c19de
Compare
Head branch was pushed to by a user without write access
54c5d91 to
9e73ce7
Compare
Head branch was pushed to by a user without write access
35c6441 to
5435f7c
Compare
|
i ran |
Head branch was pushed to by a user without write access
5435f7c to
6b940a8
Compare
Head branch was pushed to by a user without write access
6b940a8 to
524ea01
Compare
Parse comma-separated gds_path and select path per GPU worker using by_gpu sharding (device_id % num_paths), matching the approach in NIXL PR LMCache#2418. This distributes KV cache I/O across multiple NVMe drives to increase aggregate bandwidth. Single-path configs work unchanged. Includes tests (TestGdsMultiPath) and documentation updates. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
524ea01 to
543a684
Compare
Parse comma-separated gds_path and select path per GPU worker using by_gpu sharding (device_id % num_paths), matching the approach in NIXL PR LMCache#2418. This distributes KV cache I/O across multiple NVMe drives to increase aggregate bandwidth. Single-path configs work unchanged. Includes tests (TestGdsMultiPath) and documentation updates. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Parse comma-separated gds_path and select path per GPU worker using by_gpu sharding (device_id % num_paths), matching the approach in NIXL PR LMCache#2418. This distributes KV cache I/O across multiple NVMe drives to increase aggregate bandwidth. Single-path configs work unchanged. Includes tests (TestGdsMultiPath) and documentation updates. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
…finity Allow `local_disk` to accept comma-separated paths (e.g. "/mnt/nvme0/,/mnt/nvme1/") to use multiple NVMe devices. Each GPU worker selects one path at init time via device_id % num_paths, matching the GDS backend approach LMCache#2817 and NIXL approach LMCache#2418. - Path selected once in __init__; _key_to_path, write_file, read_file unchanged from upstream - file:// prefix stripped per-part in the backend (no config parser change) - All directories created at startup - Added tests and updated docs Before this change the only way to increase perfomance was to use any of the linux multi-pathing technologies to aggregate IOs. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Allow `local_disk` to accept comma-separated paths (e.g. "/mnt/nvme0/,/mnt/nvme1/") to use multiple NVMe devices. Each GPU worker selects one path at init time via the `local_disk_path_sharding` strategy (currently only "by_gpu": device_id % num_paths), matching the GDS backend approach LMCache#2817 and NIXL approach LMCache#2418. - Path selected once in __init__; _key_to_path, write_file, read_file unchanged from upstream - _parse_local_disk now uses startswith("file://") instead of regex, fixing file:// URIs without a trailing slash - All directories created at startup - Added local_disk_path_sharding config field (default: "by_gpu") - Added tests and updated docs Before this change the only way to increase performance was to use any of the linux multi-pathing technologies to aggregate IOs. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Allow `local_disk` to accept comma-separated paths (e.g. "/mnt/nvme0/,/mnt/nvme1/") to use multiple NVMe devices. Each GPU worker selects one path at init time via the `local_disk_path_sharding` strategy (currently only "by_gpu": device_id % num_paths), matching the GDS backend approach LMCache#2817 and NIXL approach LMCache#2418. - Path selected once in __init__; _key_to_path, write_file, read_file unchanged from upstream - _parse_local_disk now uses startswith("file://") instead of regex, fixing file:// URIs without a trailing slash - All directories created at startup - Added local_disk_path_sharding config field (default: "by_gpu") - Added tests and updated docs Before this change the only way to increase performance was to use any of the linux multi-pathing technologies to aggregate IOs. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Allow `local_disk` to accept comma-separated paths (e.g. "/mnt/nvme0/,/mnt/nvme1/") to use multiple NVMe devices. Each GPU worker selects one path at init time via the `local_disk_path_sharding` strategy (currently only "by_gpu": device_id % num_paths), matching the GDS backend approach LMCache#2817 and NIXL approach LMCache#2418. - Path selected once in __init__; _key_to_path, write_file, read_file unchanged from upstream - _parse_local_disk now uses startswith("file://") instead of regex, fixing file:// URIs without a trailing slash - All directories created at startup - Added local_disk_path_sharding config field (default: "by_gpu") - Added tests and updated docs Before this change the only way to increase performance was to use any of the linux multi-pathing technologies to aggregate IOs. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Allow `local_disk` to accept comma-separated paths (e.g. "/mnt/nvme0/,/mnt/nvme1/") to use multiple NVMe devices. Each GPU worker selects one path at init time via the `local_disk_path_sharding` strategy (currently only "by_gpu": device_id % num_paths), matching the GDS backend approach LMCache#2817 and NIXL approach LMCache#2418. - Path selected once in __init__; _key_to_path, write_file, read_file unchanged from upstream - _parse_local_disk now uses startswith("file://") instead of regex, fixing file:// URIs without a trailing slash - All directories created at startup - Added local_disk_path_sharding config field (default: "by_gpu") - Added tests and updated docs Before this change the only way to increase performance was to use any of the linux multi-pathing technologies to aggregate IOs. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
#2801) feat(disk): support multi-path local disk backend with path sharding Allow `local_disk` to accept comma-separated paths (e.g. "/mnt/nvme0/,/mnt/nvme1/") to use multiple NVMe devices. Each GPU worker selects one path at init time via the `local_disk_path_sharding` strategy (currently only "by_gpu": device_id % num_paths), matching the GDS backend approach #2817 and NIXL approach #2418. - Path selected once in __init__; _key_to_path, write_file, read_file unchanged from upstream - _parse_local_disk now uses startswith("file://") instead of regex, fixing file:// URIs without a trailing slash - All directories created at startup - Added local_disk_path_sharding config field (default: "by_gpu") - Added tests and updated docs Before this change the only way to increase performance was to use any of the linux multi-pathing technologies to aggregate IOs. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
LMCache#2801) feat(disk): support multi-path local disk backend with path sharding Allow `local_disk` to accept comma-separated paths (e.g. "/mnt/nvme0/,/mnt/nvme1/") to use multiple NVMe devices. Each GPU worker selects one path at init time via the `local_disk_path_sharding` strategy (currently only "by_gpu": device_id % num_paths), matching the GDS backend approach LMCache#2817 and NIXL approach LMCache#2418. - Path selected once in __init__; _key_to_path, write_file, read_file unchanged from upstream - _parse_local_disk now uses startswith("file://") instead of regex, fixing file:// URIs without a trailing slash - All directories created at startup - Added local_disk_path_sharding config field (default: "by_gpu") - Added tests and updated docs Before this change the only way to increase performance was to use any of the linux multi-pathing technologies to aggregate IOs. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Parse comma-separated gds_path and select path per GPU worker using by_gpu sharding (device_id % num_paths), matching the approach in NIXL PR #2418. This distributes KV cache I/O across multiple NVMe drives to increase aggregate bandwidth.
Single-path configs work unchanged.
Includes tests (TestGdsMultiPath) and documentation updates.
What this PR does / why we need it:
Special notes for your reviewers:
If applicable: