Skip to content

perf: unmeasured leads from the second whole-repo audit (after #467) #468

Open

Description

@CMGS

Performance leads the second whole-repo static audit (on bcca6c8) found and left without code because none is measured. Each needs a measurement before a change; costs below are estimates.

Where Lead What to measure
pool/hibernate.go idle sweep The sweep fans hibernates out wider than the engine's 8 memory dumps; a victim past the 8th holds its claim's transition with the intent committed while it waits for a dump slot, so a request to it waits for the whole hibernate instead of being served request latency to claims queued behind a large idle sweep
pool/liveness.go evictDeadWarm Each non-live or deleted VM event walks every warm VM under the manager lock; #459 indexed only claims lock hold per event at the largest warm count in use
store/dir/dir.go readRecord Every listing reads a digest file and labels.json per record on the checkpoint store too, where neither exists (#461 fixed this for s3 only); on a shared FUSE dir store each is a remote lookup listing time at a few thousand checkpoints on a shared dir store
utils/clone_linux.go The sparse copy goes through OffsetWriter/SectionReader, which hide the files from copy_file_range, so data moves through a 32 KiB user-space buffer reader fetch time of a large disk on ext4
pool/setpools.go applyPools Every applied pool set trims each pool to its current target, skipping the shrink dwell, so a PUT /v1/pools during a burst's tail destroys warm VMs above the floor that the next burst then re-clones claim tier mix around a pool-set change on an adaptive pool
engine/engine.go DialGuestPort The port-forward reply is copied into a string and back into bytes per relay connection port relay open cost (minor)

Activity

  1. CMGS commented on Nov 6, 2026

    @CMGS
    ContributorAuthor

    More unmeasured leads from the static audit of 2026-11-06 (PR #481):

    Where Lead What to measure
    store/dir SweepStaging at startup Runs the full generation sweep, which reads every record dir and meta.json before the server starts; on a shared FUSE checkpoint_dir that is about 2N remote ops on every node's boot startup time at 20k records on a shared dir store
    GET /v1/checkpoints on s3 Reads every record in the bucket, archives and replicas included, to filter by tenant (about 2,500 serial GET rounds at 20k records with the default concurrency, estimated ~50 s) list latency at 20k records on a real bucket
    Reconcile before the API serves Every unowned warm VM is removed, three at a time, before ListenAndServe restart-to-serve time at a large warm count
    engine/portconn.go One extra 32 KiB copy guest→client on the port relay port relay throughput
    server/preview.go Request bodies go through 4 KiB frames preview upload throughput
    sdk/python frames.py One base64 slice copy per bulk frame large file transfer CPU in the Python SDK
  2. CMGS commented on Nov 10, 2026

    @CMGS
    ContributorAuthor

    Status on main (v0.1.31):

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