Free up space rewrites a big game's whole store even when nothing is freed #133
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ethan-hann/SavePoint#133
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Measured on a copy of the GOG Cyberpunk 2077 install (5068 files, 91 GB in one streamed pack with its keep): Free up space with 0 Recently removed snapshots and nothing unreachable (the preview says nothing would be freed) still ran a full reclaim. It took 298 to 330 s, needed room for a second copy of the store, removed SavePoint's keep and merged the 90 GB streamed pack and a 613 MB pack into one 91 GB pack, leaving the store the same size. On a mid-range PC with a nearly full drive this can fail, and every Free up space press costs minutes for nothing.
Reclaim should only rewrite what it frees. Options to weigh: skip the repack when nothing is unreachable (a cheap reachability check over the kept packs' few objects, for example
rev-list --objects --allagainst the objects each kept pack holds); keep the keeps throughrepack -a -dand only drop the keep of a kept pack that holds an unreachable object, so only that pack is rewritten; and make the preview and the job agree. Also note thatIGamesApi.OptimizeStorageAsyncis always a reclaim, so nothing can run a routine optimization on demand; decide whether that is intended (D28).