Repository navigation
Report what the storage driver did: S3-RDMA driver statistics - #226
Merged
Merged
Conversation
Unregister forced a refresh and then read the shared snapshot separately, so a scrape or poll refresh already in flight could publish its older result in between and the retained entry kept it as complete. Refreshes of one metrics context now run one at a time, and the terminal snapshot is taken under that lock and pinned until the context starts again or closes. On the fleet the pin covers the read's presence and partial state as well.
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.
Summary
Choosing the
s3-rdmadriver doesn't prove that payloads moved over RDMA. An operation can be below the threshold, too large for one buffer, declined by the server, or sent over HTTP after RDMA preparation failed. The driver already kept counts, but they left the engine only as one log line at driver close. The CLI read nothing about the driver, so a run that sent every payload over HTTP produced a normal-looking summary.This adds a generic driver statistics contract: a storage driver can report named counters and gauges about itself. The engine carries them through the metrics rows, fleet totals, terminal retention, the stored results and the Prometheus endpoint. The
s3-rdmadriver is the first to report them.JSON: rows of
/metrics/jsonand/metrics/fleet/jsongain an optionaldriver_statsobject.countersandgauges.reporting, the number of nodes in the sum, andpartial.partial: trueand thedriversseen.s3-rdmastatistics:Run summary: each step in which the driver sent payload requests gets one block, for example
RDMA Data Path — Read: 237030 transfers reported over RDMA, 0 payload requests sent over HTTP. It adds one line for each problem count above zero. The summary warns when a step moved no payload over RDMA, and when a run with--s3-driver rdmahas no statistics. It shows counts only, no percentage.Stored results: each step's final statistics go to
spt_run_params.jsonunderdriverStats. The CLI reads them while it monitors the run, as each step ends. It stores them only when they are complete; otherwise it records why indriverStatsError. It never stores partial statistics.Prometheus: while a step runs, the entry node's
/metricsexports the step's fleet total:spt_driver_<counter>_totalcounters;spt_driver_<gauge>gauges;spt_driver_reportingandspt_driver_partial;driverlabel.A counter never falls below a value it showed, and the series end with the step.
Changes
spt-base):StorageDrivergains a default method that returns a statistics snapshot,nullby default.LoadStepContextImplregisters one supplier per driver.MetricsContextImplcollects it inside the existing 100 ms snapshot guard, and on a forced refresh.DistributedMetricsContextImplbuildsDriverStatsTotalunder the fleet rules.TerminalStepEntryandMetricsManagerImplkeep a finished step's final statistics, including for a mixed step whose carrier context ends first, and for a step whose driver counted work but completed nothing.MetricsJsonResponderwritesdriver_stats, andPrometheusMetricsExporterImpl, throughDriverStatsCollector, exports the fleet total.MetricsContextImplandDistributedMetricsContextImplrefresh one at a time.MetricsManagerImpl.unregistertakes a step's final values with the newMetricsContext.terminalSnapshot(). A refresh already in flight finishes first, and no later one replaces the result, so a scrape or poll overlapping the step's end can no longer leave earlier counts in the retained entry marked complete (final review R1,46034e07).s3-rdma:RdmaPathStatssplits the declined outcome and adds request, registration and failure counters.RdmaBufferPoolreports its counters and levels in one read under its monitor, plus a peak.RdmaDriverStatsmaps them to the public names.run_driver_stats.go);spt_run_params.json;driverstatsmodel and RDMA view;spt replaycaptures the statistics too.cli/docs/S3_RDMA.md: every statistic, what it counts and what it must not be read as;METRICS.md: thedriver_statsobject and the Prometheus series;metrics-schema-v5.jsonand a new example;CHANGELOG.mdunder Unreleased › Added and › Fixed.mainat5bed9172is merged into it in74fbb0a6. In the metrics classes the snapshot and terminal-entry constructors now carry both main's steady-state result and the driver statistics. Each side's earlier constructor is kept and delegates to the new one.Compatibility
driver_statskey, no summary line, no stored field.metrics_schemastays 5, anddriver_statsis an optional field of schema 5, which is unreleased.StorageDriver.driverStats()andMetricsContext.terminalSnapshot(), and default accessors onAllMetricsSnapshotandDistributedAllMetricsSnapshot. Existing public constructors of the snapshot classes and ofTerminalStepEntryare kept.RDMA data path summarylog line keeps its format.Notes
S3_RDMA.md.--s3-driver rdma, the CLI passes/dev/infinibandto the container, so--rdma-fallbackcannot start on a host without it;main's own 8–10% spread. A full performance run on RDMA hardware comes before the 5.17 release, and performance is not described as qualified until then.