Repository navigation
Implements the kv_save_blocks_total counter metric (tpu_raiden_kv_save_blocks_total{dp_rank, tier, outcome}) to track block save outcomes across KV cache offload tiers: - #1371
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_999559866
branch
from
October 27, 2026 18:05
f35ed1d to
4930cd1
Compare
kv_save_blocks_total counter metric (tpu_raiden_kv_save_blocks_total{host_ip, dp_rank, tier, outcome}) to track block save outcomes across KV cache offload tiers:
copybara-service
Bot
force-pushed
the
test_999559866
branch
2 times, most recently
from
October 29, 2026 08:06
d3cd5b1 to
dd4c5b0
Compare
kv_save_blocks_total counter metric (tpu_raiden_kv_save_blocks_total{host_ip, dp_rank, tier, outcome}) to track block save outcomes across KV cache offload tiers:kv_save_blocks_total counter metric (tpu_raiden_kv_save_blocks_total{dp_rank, tier, outcome}) to track block save outcomes across KV cache offload tiers:
copybara-service
Bot
force-pushed
the
test_999559866
branch
3 times, most recently
from
November 2, 2026 18:11
96dbbd5 to
19bcb68
Compare
…save_blocks_total{dp_rank, tier, outcome}`) to track block save outcomes across KV cache offload tiers:
- Declares `kKvSaveBlocksTotal` (`MetricType::kCounter`) along with `outcome` label values `kOutcomeRejected` (`"rejected"`) and `kOutcomeFailed` (`"failed"`) in `metrics_backend.h`.
- Instruments `KVCacheStore::Insert` (`tier="local_dram"`, `outcome="rejected"` for the whole batch when `InsertOption::kInsertAndPin` fails, either for lack of unpinned space or because an existing hash could not be pinned), `KVCacheStore::SaveLocal` (`tier="local_dram"`; host block allocation failure counts `outcome="rejected"` on `RESOURCE_EXHAUSTED` and `"failed"` on any other error; storage write-through counts `"ok"` / `"failed"` when the offload settles), `HostOffloadBackend::Save` (`tier="local_dram"`, `outcome="ok"` / `"failed"`), and `HostOffloadBackend::BeginWriteRemote` (`tier="remote_dram"`, `outcome="ok"`, `"rejected"`, and `"failed"` across peer RPC and transfer settle paths).
- Adds unit tests verifying `kv_save_blocks_total` across `local_dram` (including storage write-through) and `remote_dram` tiers.
PiperOrigin-RevId: 1012317747
copybara-service
Bot
force-pushed
the
test_999559866
branch
from
November 2, 2026 19:27
19bcb68 to
f9a6112
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the
kv_save_blocks_totalcounter metric (tpu_raiden_kv_save_blocks_total{dp_rank, tier, outcome}) to track block save outcomes across KV cache offload tiers:kKvSaveBlocksTotal(MetricType::kCounter) along withoutcomelabel valueskOutcomeRejected("rejected") andkOutcomeFailed("failed") inmetrics_backend.h.KVCacheStore::Insert(tier="local_dram",outcome="rejected"for the whole batch whenInsertOption::kInsertAndPinfails, either for lack of unpinned space or because an existing hash could not be pinned),KVCacheStore::SaveLocal(tier="local_dram"; host block allocation failure countsoutcome="rejected"onRESOURCE_EXHAUSTEDand"failed"on any other error; storage write-through counts"ok"/"failed"when the offload settles),HostOffloadBackend::Save(tier="local_dram",outcome="ok"/"failed"), andHostOffloadBackend::BeginWriteRemote(tier="remote_dram",outcome="ok","rejected", and"failed"across peer RPC and transfer settle paths).kv_save_blocks_totalacrosslocal_dram(including storage write-through) andremote_dramtiers.