Open jbenet opened 9 years ago
A threshold triggering repo gc
sgtm. I'd be interested in ratio stats of pinned vs unpinned objects in general.
From #1482, i think we should have one global maximum storage, and trigger GC when we past a watermark (say max - 1/5MB close). ideally we could also configure the GC watermark to bring it lower.
node.repo.datastore.storage_gc_watermark
~ hard limit on pin size? Otherwise even GC after commands won't bring down the repo size.
How about swapping the hard limit role?
Instead of storage_gc_watermark
+ storage_max
(hard limit), use pin_max
(hard limit) + blurriness
? blurriness
/standard_dev
/swappiness
is like the amount of bluriness between local storage and peer storage. Default value is 100 (100% of pin_max
).
By now, the only concern for global size cap other than blockstore is leveldb store size.
Also, where to put the trigger check?
GetBlocks
cycle
It is a common problem already that the space of go-ipfs grows unbounded. We want to have the ability to limit the growth.
Complicating factors:
I've been thinking of a setup with two thresholds:
repo gc
.