[PR #1201] [MERGED] [Store]: Add master_bench for benchmarking QPS of MasterService #2068

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

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/1201
Author: @nickyc975
Created: 12/12/2025
Status: ✅ Merged
Merged: 12/12/2025
Merged by: @stmatengss

Base: main ← Head: jinlong/master-bench


📝 Commits (2)

  • e7ebd59 [Store]: Add master_bench for benchmarking QPS of MasterService
  • 7e7b546 [Store]: Resolve code review problems

📊 Changes

2 files changed (+462 additions, -0 deletions)

View changed files

📝 mooncake-store/benchmarks/CMakeLists.txt (+4 -0)
➕ mooncake-store/benchmarks/master_bench.cpp (+458 -0)

📄 Description

Description

For #1193 . Add a benchmark tool master_bench for benchmarking QPS of MasterService. master_bench simulates multiple clients sending RPC requests concurrently with multi-threading. Currently, only Get, Put, BatchGet, and BatchPut are supported.

Usage

# ./mooncake-store/benchmarks/master_bench --help

...

Flags from ./mooncake-store/benchmarks/master_bench.cpp:
    -batch_size (Batch size for batch operations) type: uint64 default: 128
    -duration (Test duration in seconds) type: uint64 default: 60
    -master_server (Master server address) type: string
      default: "127.0.0.1:50051"
    -num_clients (Number of clients to perform operations) type: uint64
      default: 4
    -num_keys (Number of keys to prefill for Get operations on each thread)
      type: uint64 default: 10000
    -num_segments (Number of segments to mount) type: uint64 default: 128
    -num_threads (Number of threads in each thread to preform operations)
      type: uint64 default: 1
    -operation (Operation to perform) type: string default: "BatchPut"
    -segment_size (Size of each segment) type: uint64 default: 68719476736
    -value_size (Size of object values) type: uint64 default: 4096

Type of Change

  • Types
    • Bug fix
    • New feature
      • Transfer Engine
      • Mooncake Store
      • Mooncake EP
      • Integration
      • P2P Store
      • Python Wheel
    • Breaking change
    • CI/CD
    • Documentation update
    • Other

How Has This Been Tested?

Here are some benchmarking results, just for reference:

Test configurations

# For BatchGet
./mooncake-store/benchmarks/master_bench --num_segments=16 --duration=30 --num_clients=8 --num_threads=8 --batch_size=4096 --master_server=<server_ip>:50051 --operation=BatchGet --num_keys=1000000

# For BatchPut
./mooncake-store/benchmarks/master_bench --num_segments=16 --duration=30 --num_clients=8 --num_threads=8 --batch_size=4096 --master_server=<server_ip>:50051 --operation=BatchPut

Test results

master rpc_thread_num BatchGet BatchPut
8 4.3 M 1.6 M
16 8.1 M 2.4 M
32 14.0 M 3.1 M
64 17.4 M 5.2 M

Checklist

  • I have performed a self-review of my own code.
  • I have updated the documentation.
  • I have added tests to prove my changes are effective.

🔄 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/1201 **Author:** [@nickyc975](https://github.com/nickyc975) **Created:** 12/12/2025 **Status:** ✅ Merged **Merged:** 12/12/2025 **Merged by:** [@stmatengss](https://github.com/stmatengss) **Base:** `main` ← **Head:** `jinlong/master-bench` --- ### 📝 Commits (2) - [`e7ebd59`](https://github.com/kvcache-ai/Mooncake/commit/e7ebd59bc48cb3daa6b139358759728dbace05e3) [Store]: Add master_bench for benchmarking QPS of MasterService - [`7e7b546`](https://github.com/kvcache-ai/Mooncake/commit/7e7b546ee7cd1b2691a35204871a30501cbc5ce5) [Store]: Resolve code review problems ### 📊 Changes **2 files changed** (+462 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-store/benchmarks/CMakeLists.txt` (+4 -0) ➕ `mooncake-store/benchmarks/master_bench.cpp` (+458 -0) </details> ### 📄 Description ## Description For #1193 . Add a benchmark tool `master_bench` for benchmarking QPS of MasterService. `master_bench` simulates multiple clients sending RPC requests concurrently with multi-threading. Currently, only `Get`, `Put`, `BatchGet`, and `BatchPut` are supported. ### Usage ``` # ./mooncake-store/benchmarks/master_bench --help ... Flags from ./mooncake-store/benchmarks/master_bench.cpp: -batch_size (Batch size for batch operations) type: uint64 default: 128 -duration (Test duration in seconds) type: uint64 default: 60 -master_server (Master server address) type: string default: "127.0.0.1:50051" -num_clients (Number of clients to perform operations) type: uint64 default: 4 -num_keys (Number of keys to prefill for Get operations on each thread) type: uint64 default: 10000 -num_segments (Number of segments to mount) type: uint64 default: 128 -num_threads (Number of threads in each thread to preform operations) type: uint64 default: 1 -operation (Operation to perform) type: string default: "BatchPut" -segment_size (Size of each segment) type: uint64 default: 68719476736 -value_size (Size of object values) type: uint64 default: 4096 ``` ## Type of Change * Types - [ ] Bug fix - [x] New feature - [ ] Transfer Engine - [x] Mooncake Store - [ ] Mooncake EP - [ ] Integration - [ ] P2P Store - [ ] Python Wheel - [ ] Breaking change - [ ] CI/CD - [ ] Documentation update - [ ] Other ## How Has This Been Tested? Here are some benchmarking results, just for reference: ### Test configurations ```bash # For BatchGet ./mooncake-store/benchmarks/master_bench --num_segments=16 --duration=30 --num_clients=8 --num_threads=8 --batch_size=4096 --master_server=<server_ip>:50051 --operation=BatchGet --num_keys=1000000 # For BatchPut ./mooncake-store/benchmarks/master_bench --num_segments=16 --duration=30 --num_clients=8 --num_threads=8 --batch_size=4096 --master_server=<server_ip>:50051 --operation=BatchPut ``` ### Test results |master rpc_thread_num|BatchGet|BatchPut| |:-:|:-:|:-:| |8|4.3 M|1.6 M| |16|8.1 M|2.4 M| |32|14.0 M|3.1 M| |64|17.4 M|5.2 M| ## Checklist - [x] I have performed a self-review of my own code. - [ ] I have updated the documentation. - [x] I have added tests to prove my changes are effective. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:32:32 +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#2068
No description provided.