[PR #733] [MERGED] feat(client): Add client-side metrics for transfer and RPC operations #1779

Closed
opened 2026-10-29 21:30:16 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/733
Author: @xiaguan
Created: 8/12/2025
Status: ✅ Merged
Merged: 8/13/2025
Merged by: @xiaguan

Base: main ← Head: master_client_metric


📝 Commits (9)

  • d5486e3 feat(client): Add RPC operation and tansfer metrics tracking
  • ba52666 feat(client): Add client-side metrics for transfer and RPC operations
  • 6b6d76b fix test
  • 48d5eef Update mooncake-store/src/client.cpp
  • b1868bd Update mooncake-store/src/client.cpp
  • 8027424 Update mooncake-store/src/client.cpp
  • 7629f4f fix format issue
  • a98b0b4 refactor(client): make client metrics optional using ClientMetric class
  • 19871fa fix lint

📊 Changes

11 files changed (+869 additions, -28 deletions)

View changed files

📝 mooncake-store/include/client.h (+23 -0)
➕ mooncake-store/include/client_metric.h (+276 -0)
📝 mooncake-store/include/master_client.h (+8 -8)
📝 mooncake-store/include/transfer_task.h (+11 -1)
📝 mooncake-store/src/CMakeLists.txt (+1 -0)
📝 mooncake-store/src/client.cpp (+57 -2)
➕ mooncake-store/src/client_metric.cpp (+133 -0)
📝 mooncake-store/src/master_client.cpp (+132 -10)
📝 mooncake-store/src/transfer_task.cpp (+39 -7)
📝 mooncake-store/tests/CMakeLists.txt (+11 -0)
➕ mooncake-store/tests/client_metrics_test.cpp (+178 -0)

📄 Description

In this PR, we introduce client side support for both transfer and RPC-related metrics.

We provide interface support: Prometheus-style and human-readable formats. Additionally, we've implemented a background thread for metric printing (disabled by default).

I20250812 17:07:51.023622 117228 client.cpp:1417] Client Metrics Report:
Client Metrics Summary
=== Transfer Metrics Summary ===
Total Read: 5.00 MB
Total Write: 5.00 MB

=== Latency Summary (microseconds) ===
Get: count=103, p95<250μs, max<15000μs
Put: count=4, p95<1500μs, max<15000μs
Batch Get: count=1, p95<125μs, max<15000μs
Batch Put: count=3, p95<5000μs, max<20000μs

=== RPC Metrics Summary ===
GetReplicaList: count=104, p95<150μs, max<200μs
PutStart: count=5, p95<250μs, max<250μs
PutEnd: count=4, p95<200μs, max<1500μs
Remove: count=29, p95<300μs, max<400μs
MountSegment: count=1, p95<125μs, max<7000μs
GetFsdir: count=1, p95<125μs, max<250μs
BatchGetReplicaList: count=1, p95<125μs, max<300μs
BatchPutStart: count=3, p95<250μs, max<500μs
BatchPutEnd: count=3, p95<150μs, max<200μs

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/Mooncake/pull/733 **Author:** [@xiaguan](https://github.com/xiaguan) **Created:** 8/12/2025 **Status:** ✅ Merged **Merged:** 8/13/2025 **Merged by:** [@xiaguan](https://github.com/xiaguan) **Base:** `main` ← **Head:** `master_client_metric` --- ### 📝 Commits (9) - [`d5486e3`](https://github.com/kvcache-ai/Mooncake/commit/d5486e36a51c82bdc13e0be64fe6cdc83aebaa3a) feat(client): Add RPC operation and tansfer metrics tracking - [`ba52666`](https://github.com/kvcache-ai/Mooncake/commit/ba526661389b7dc93f70903e225e6c6af80ff182) feat(client): Add client-side metrics for transfer and RPC operations - [`6b6d76b`](https://github.com/kvcache-ai/Mooncake/commit/6b6d76b3f89298258e9112e01fa0c8acd2c8e0d0) fix test - [`48d5eef`](https://github.com/kvcache-ai/Mooncake/commit/48d5eef34524d2ad2b66de80a9b5ae0386d98a94) Update mooncake-store/src/client.cpp - [`b1868bd`](https://github.com/kvcache-ai/Mooncake/commit/b1868bd52466e2900f39300993b566ff16b4e9fd) Update mooncake-store/src/client.cpp - [`8027424`](https://github.com/kvcache-ai/Mooncake/commit/8027424f3ec88ab3fa0af55d93a65baf5c4768dd) Update mooncake-store/src/client.cpp - [`7629f4f`](https://github.com/kvcache-ai/Mooncake/commit/7629f4f6200dbd4f4e64b5c91eedf994bf87ff50) fix format issue - [`a98b0b4`](https://github.com/kvcache-ai/Mooncake/commit/a98b0b46a0578101c9b15d06d823e570eb991efc) refactor(client): make client metrics optional using ClientMetric class - [`19871fa`](https://github.com/kvcache-ai/Mooncake/commit/19871fadba64e17c331f5285eca6194fbabf79f1) fix lint ### 📊 Changes **11 files changed** (+869 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-store/include/client.h` (+23 -0) ➕ `mooncake-store/include/client_metric.h` (+276 -0) 📝 `mooncake-store/include/master_client.h` (+8 -8) 📝 `mooncake-store/include/transfer_task.h` (+11 -1) 📝 `mooncake-store/src/CMakeLists.txt` (+1 -0) 📝 `mooncake-store/src/client.cpp` (+57 -2) ➕ `mooncake-store/src/client_metric.cpp` (+133 -0) 📝 `mooncake-store/src/master_client.cpp` (+132 -10) 📝 `mooncake-store/src/transfer_task.cpp` (+39 -7) 📝 `mooncake-store/tests/CMakeLists.txt` (+11 -0) ➕ `mooncake-store/tests/client_metrics_test.cpp` (+178 -0) </details> ### 📄 Description In this PR, we introduce client side support for both transfer and RPC-related metrics. We provide interface support: Prometheus-style and human-readable formats. Additionally, we've implemented a background thread for metric printing (disabled by default). ``` I20250812 17:07:51.023622 117228 client.cpp:1417] Client Metrics Report: Client Metrics Summary === Transfer Metrics Summary === Total Read: 5.00 MB Total Write: 5.00 MB === Latency Summary (microseconds) === Get: count=103, p95<250μs, max<15000μs Put: count=4, p95<1500μs, max<15000μs Batch Get: count=1, p95<125μs, max<15000μs Batch Put: count=3, p95<5000μs, max<20000μs === RPC Metrics Summary === GetReplicaList: count=104, p95<150μs, max<200μs PutStart: count=5, p95<250μs, max<250μs PutEnd: count=4, p95<200μs, max<1500μs Remove: count=29, p95<300μs, max<400μs MountSegment: count=1, p95<125μs, max<7000μs GetFsdir: count=1, p95<125μs, max<250μs BatchGetReplicaList: count=1, p95<125μs, max<300μs BatchPutStart: count=3, p95<250μs, max<500μs BatchPutEnd: count=3, p95<150μs, max<200μs ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:30:16 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#1779
No description provided.