Skip to content

design: reconciliation policy for reported vs measured device profile fields (post-#55) #60

Description

@drunkcoding

Context

#55 (now closed) added server-side measurement of five device-profile fields (measured_lat_ns, measured_ul_bw_bps, measured_dl_bw_bps, measured_flops, measured_flops_verified) via the new M1→M2→M3 probe pipeline. These are written to the device-tracker side-by-side with the seven device-reported legacy fields (flops, memory, ul_bw, dl_bw, ul_lat, dl_lat, uuid) via DeviceTracker::UpdateMeasuredProfile; the legacy fields are explicitly never overwritten.

This was deliberate. #55 carved out reconciliation as "out of scope — separate issue once data is flowing" so the trust-model fix could land without prejudging downstream consumers.

The question

Once measurement is enabled in production and we've seen real measured-vs-reported skews, what value should downstream schedulers and analytics consume when they ask for "the device's FLOPS / bandwidth / latency"?

Three obvious policies, each with tradeoffs:

Policy Pro Con
min(reported, measured) Conservative; resists devices over-stating capability Discards real measurement signal if device under-reports honestly
measured (when present, else reported) Uses the most defensible number Single probe is a point estimate; can be noisy
Weighted blend (e.g. EMA over multiple measurement rounds) Smooths noise; tracks drift Needs storage, decay-constant tuning, repeated probing (which #55 explicitly does not do)

Inputs needed before deciding

  1. Real data. Run Device measurement: probe wire protocol + server coordinator (#45 steps 3-8) #55's --measurement flag in a representative deployment for a few hours / days and look at the distribution of measured / reported ratios per field per device. The decision is data-driven, not a priori.
  2. Consumer audit. Identify every reader of DeviceProfileData::flops / bandwidth / latency in the scheduler, dispatch gate, and analytics. Each may want a different policy (analytics probably wants raw both; scheduler probably wants min).
  3. Re-probe cadence. Decide whether measurement is one-shot at registration (current behavior) or periodic. The policy choice changes a lot if re-probing happens.

Suggested next step

Don't pick a policy until #55 has been running in at least one real deployment for long enough to populate logs/perf_server.log with measured-vs-reported deltas. Then write a short data-driven proposal and ship the chosen policy as a separate, single-purpose PR. Until then, both fields remain available side-by-side and consumers explicitly choose.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions