You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: unmeasured leads from the second whole-repo audit (after #467) #468
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.goevictDeadWarm
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.goreadRecord
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.goapplyPools
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.goDialGuestPort
The port-forward reply is copied into a string and back into bytes per relay connection
More unmeasured leads from the static audit of 2026-11-06 (PR #481):
Where
Lead
What to measure
store/dirSweepStaging 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
Unchanged: the dir readRecord digest and labels reads, the applyPools trim without the shrink dwell, the DialGuestPort string copy, SweepStaging at startup, reconcile before serve, the port relay copy, the preview 4 KiB frames, and the Python frames.py slice copy.
Activity
CMGS commentedon Nov 6, 2026
More unmeasured leads from the static audit of 2026-11-06 (PR #481):
store/dirSweepStagingat startupmeta.jsonbefore the server starts; on a shared FUSEcheckpoint_dirthat is about 2N remote ops on every node's bootGET /v1/checkpointson s3ListenAndServeengine/portconn.goserver/preview.gosdk/pythonframes.pyCMGS commentedon Nov 10, 2026
Status on main (v0.1.31):
copyDatanow copies each data range in 1 MiBReadAt/WriteAtblocks and leaves zero blocks as holes. Hardware A/B on ext4 without reflink: −4 to −6% against the old code. Acopy_file_rangearm is still 4–6% faster than utils: copy data ranges in 1 MiB blocks and leave zero blocks as holes #542 (F1 830.8 vs 877.6 ms, F2 1589.3 vs 1650.9 ms median), so the remaining lead is that gap. On a JuiceFS dir store, the first read of an archived claim no longer writes the zero bytes.ar_records, and the listing usesPrefix=ck_, so they are never listed or read. Eachck_record'smeta.jsonis still read to filter by tenant.runBoundedruns at mostcap(maintSem)workers, so at mostcap(maintSem) − 8victims wait for a dump slot while holding their transition. On a large host that is still many (maintSemisrefill − refill/4). Not re-measured.readRecorddigest and labels reads, theapplyPoolstrim without the shrink dwell, theDialGuestPortstring copy,SweepStagingat startup, reconcile before serve, the port relay copy, the preview 4 KiB frames, and the Pythonframes.pyslice copy.