Skip to content

scheduling, workercache: add microbenchmarks for Schedule and Workers #4001

Done

Description

Nothing measures scheduling.Schedule or workercache.Cache.Workers on its own.

The ate.scheduler.assignment.duration histogram wraps Schedule together with the Postgres BindActorToWorker transaction, so millisecond store round-trips hide microsecond changes in scheduler filtering and cache copying.

Proposal

Add Go benchmarks (testing.B with -benchmem) to measure placement CPU and allocations in isolation:

  1. BenchmarkSchedule (cmd/ateapi/internal/scheduling): Times one placement per assignWorkerAttempt call across 100, 1,000, and 10,000 workers on a deterministic gVisor-shaped fleet (64-digit cpu_features, RuntimeOverhead, selectors, and existing allocations) covering five scenarios:
    • cold-boot
    • memory-hit
    • memory-fallback
    • memory-mixed
    • pinned
      Include TestBenchScenarios to verify each scenario lands on the expected worker type.
  2. BenchmarkWorkers (cmd/ateapi/internal/workercache): Times Cache.Workers() across 100, 1,000, and 10,000 workers separately, so cache copy cost and scheduler filter cost can be read apart.

Activity

  1. added
    kind/feature
    on Nov 19, 2026
  2. added
    ready-for-pr
    on Nov 23, 2026
  3. shrutiyam-glitch commented on Nov 23, 2026

    @shrutiyam-glitch
    CollaboratorAuthor
  4. added a commit that references this issue on Nov 23, 2026
    a071f26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/benchmarkingarea/schedulingkind/featureready-for-pr

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions