Files
aria2-rust-pro/docs/perf/rpc-pressure-evidence.md
T

2.6 KiB

RPC Pressure Evidence

This file records the current synthetic RPC responsiveness guard for aria2-rust-pro.

Scope

Current guard coverage is synthetic but no longer limited to a single tellStatus loop:

  • in-process dispatcher
  • BT-like magnet workload
  • repeated aria2.tellStatus
  • sampled aria2.getFiles
  • repeated aria2.tellActive
  • repeated aria2.tellGlobalStat
  • Criterion rpc_mixed_pressure and bt_visibility_pressure anchors

This is not a public-swarm benchmark. It is a deterministic regression guard for scheduler/RPC responsiveness while the runtime is still approximation-heavy.

Guard Tests

  • rpc_bt_pressure_guard_keeps_status_active_and_global_stat_responsive
  • rpc_bt_mixed_pressure_guard_covers_churned_status_files_and_global_views

Basic guard shape:

  • 64 BT-like magnet tasks
  • 4 pressure rounds
  • 256 total tellStatus calls
  • 4 tellActive calls
  • 4 tellGlobalStat calls
  • runtime tick updates injected during the loop to keep non-zero BT-like state

Mixed guard shape:

  • 96 BT-like magnet tasks
  • 6 pressure rounds
  • 576 total tellStatus calls
  • 72 sampled getFiles calls
  • 6 tellActive calls
  • 6 tellGlobalStat calls
  • per-download runtime tick churn before every status probe

Current Thresholds

These thresholds are deliberately broad. They are there to catch obvious regressions, not to certify final performance:

  • cumulative tellStatus time across the run: <= 2000ms
  • cumulative tellActive time across the run: <= 500ms
  • cumulative tellGlobalStat time across the run: <= 500ms
  • cumulative mixed guard time across the run: <= 4000ms

Current Criterion Anchors

Current focused Criterion runs on this host:

Benchmark Mean 95% CI
rpc_mixed_pressure/mixed_rpc/96 92.383 us 90.867 .. 93.895 us
rpc_mixed_pressure/mixed_rpc/192 175.169 us 160.464 .. 192.884 us
bt_visibility_pressure/bt_visibility/32 2.3293 ms 1.0756 .. 4.0986 ms
bt_visibility_pressure/bt_visibility/64 2.1302 ms 2.0707 .. 2.2057 ms

Interpretation:

  • the deterministic integration tests now cover mixed BT/RPC status, file, and global-stat surfaces under runtime churn
  • the Criterion anchors give a current non-HTTP performance regression guard
  • the thresholds remain intentionally broad so host-local noise does not turn a synthetic guard into a flaky gate

Next Steps

Further work should extend this guard with:

  • explicit scheduler tick pressure
  • resource counters suitable for later perf reporting
  • a documented comparison against the C++ reference once comparable benchmark suites exist