Skip to content

rqe cost export: sweep items per instance and re-export (follow-up to #147) #157

Open

Description

@zzylol

Goal

Finish #147's last item and put its merged fixes into a real cost table: sweep items per instance in scripts/export_rqe_optimizer_costs.sh, and let rqe-optimizer read each row's costs and accuracy at the deployment's own instance size instead of the benchmark's.

Why

#145's cost model applies each row to instances of λ × x / card(G) items per window. Real windows are often far smaller than the benchmark's 1,000,000 values (200,000 rows for the column-spec runs). Since #155 every row records measured_at.items_per_instance, so the gap is visible, but there is still only one size to read from.

From #147's analysis, the size affects:

Families Affects Phases
KLL CPU: merge and query cost grow with retained items, up to the k bound merge, query
KLL Memory: the exported 4 × k × 8 ignores n; real size grows slowly with n ingest, merge, storage
DDSketch CPU: merge walks the buckets (expected); #152 rescales memory only merge
KLL, DDSketch CPU: fold cost grows with operand size, up to their bounds merge
CMS+heap, CountSketch+heap, UnivMon Accuracy: counter error grows with load, so lighter instances are more accurate (expected) —
HLL, CMS counters, exact accumulators No effect expected —

Work

Related

🤖 Generated with Claude Code

Activity

  1. zzylol commented on Oct 6, 2026

    @zzylol
    CollaboratorAuthor

    Scope change after #156: accuracy vs. items per instance is #156 (saturation curves read at n(T)), so this issue keeps only:

    The "optimizer reads at the deployment's size" item is superseded by #156.

    🤖 Generated with Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions