Skip to content

Add configurable rpc_socket_max_reads_per_event parameter#526

Open
charles-typ wants to merge 3 commits intofacebookresearch:v2-betafrom
charles-typ:export-D96763733-to-v2-beta
Open

Add configurable rpc_socket_max_reads_per_event parameter#526
charles-typ wants to merge 3 commits intofacebookresearch:v2-betafrom
charles-typ:export-D96763733-to-v2-beta

Conversation

@charles-typ
Copy link
Contributor

Summary:
Add support for configuring ThriftServer's socketMaxReadsPerEvent via CLI
flag. This controls how many reads a single connection can perform per
event loop iteration, which affects multi-client scalability.

Changes:

  • Add rpc_socket_max_reads_per_event gflag to UcacheBenchRpcServer.cpp
  • Apply flag value to thriftServer_->setSocketMaxReadsPerEvent()
  • Add parameter to benchmark configs (debug/large/medium/small) with
    default value of 1 matching production ucache
  • Add --rpc-socket-max-reads-per-event CLI arg in jobs_internal.yml
  • Add parameter to ALLOWED_PARAMS in ucache_bench_benchmark.py

Differential Revision: D96763733

…acebookresearch#523)

Summary:

Add support for a configurable delay before starting perf record during
server benchmarks. This allows profiling to capture steady-state behavior
after client warmup completes.

Changes:
- Add perf_record_delay parameter to benchmark configs (ALLOWED_PARAMS)
- Auto-compute server's perf_record_delay from client's warmup_seconds
  when DCPERF_PERF_RECORD is enabled (warmup + 60s buffer)
- Add --perf-record-delay CLI argument to server with 120s default
- Implement profile_server() function with threading.Timer for delayed
  perf record start (5 second system-wide profile)
- Update jobs_internal.yml with perf_record_delay in ucache_bench jobs

Reviewed By: ahmadelyoussef

Differential Revision: D96231930
)

Summary:

The cachelib_num_shards parameter was parsed from gflags and stored in
UcacheBenchConfig but never actually applied to the CacheAllocator::Config.
This meant the config value was silently ignored and CacheLib used its
default of 8192 shards.

Now call setNumShards() when cachelib_num_shards > 0, allowing the
benchmark to match production shard counts for more accurate CPU
utilization profiling.

Differential Revision: D96087814
Summary:
Add support for configuring ThriftServer's socketMaxReadsPerEvent via CLI
flag. This controls how many reads a single connection can perform per
event loop iteration, which affects multi-client scalability.

Changes:
- Add rpc_socket_max_reads_per_event gflag to UcacheBenchRpcServer.cpp
- Apply flag value to thriftServer_->setSocketMaxReadsPerEvent()
- Add parameter to benchmark configs (debug/large/medium/small) with
  default value of 1 matching production ucache
- Add --rpc-socket-max-reads-per-event CLI arg in jobs_internal.yml
- Add parameter to ALLOWED_PARAMS in ucache_bench_benchmark.py

Differential Revision: D96763733
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 16, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 16, 2026

@charles-typ has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96763733.

charles-typ added a commit to charles-typ/DCPerf that referenced this pull request Mar 16, 2026
…search#526)

Summary:

Add support for configuring ThriftServer's socketMaxReadsPerEvent via CLI
flag. This controls how many reads a single connection can perform per
event loop iteration, which affects multi-client scalability.

Changes:
- Add rpc_socket_max_reads_per_event gflag to UcacheBenchRpcServer.cpp
- Apply flag value to thriftServer_->setSocketMaxReadsPerEvent()
- Add parameter to benchmark configs (debug/large/medium/small) with
  default value of 1 matching production ucache
- Add --rpc-socket-max-reads-per-event CLI arg in jobs_internal.yml
- Add parameter to ALLOWED_PARAMS in ucache_bench_benchmark.py

Differential Revision: D96763733
charles-typ added a commit to charles-typ/DCPerf that referenced this pull request Mar 16, 2026
…search#526)

Summary:

Add support for configuring ThriftServer's socketMaxReadsPerEvent via CLI
flag. This controls how many reads a single connection can perform per
event loop iteration, which affects multi-client scalability.

Changes:
- Add rpc_socket_max_reads_per_event gflag to UcacheBenchRpcServer.cpp
- Apply flag value to thriftServer_->setSocketMaxReadsPerEvent()
- Add parameter to benchmark configs (debug/large/medium/small) with
  default value of 1 matching production ucache
- Add --rpc-socket-max-reads-per-event CLI arg in jobs_internal.yml
- Add parameter to ALLOWED_PARAMS in ucache_bench_benchmark.py

Differential Revision: D96763733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant