Hi,

Bernhard R. Link wrote (08 May 2016 11:16:26 GMT) :
> You might want to start with checking the stats of that file to see
> if there is some libdb corruption in there or only no space freed.

> db*_verify db/references.db
> db*_stats -d db/references.db -s references

Yes, I had done that. No corruption, and lots free space.

>> And, just in case I find someone ready to implement it: any pointer to
>> where and how it could be done?

> It's a pity that libdb does not come with some dbX.Y_compact utility.

Agreed!

FWIW, I tried to compact a few of my references.db with
https://git-tails.immerda.ch/puppet-tails/tree/files/reprepro/snapshots/time_based/tails-compact-reprepro-db
and while I see very good results on my smallest files (up to a few
hundreds of MB initially, saved more than 50% each time), this saved
only a few % on my biggest (5.4 GB) references.db. I tried various
values between 5 and 100 for compact_fillpercent.

So it looks like my initial proposal is not good enough, and instead
it would be nice if reprepro had support for:

> For a short hot-fix you might try to use db*_dump and db*_load to create
> a copy of the database.

I did that on my biggest references.db and it shrinked from 5.4 GB to
1.5 GB. Woohoo! :)

> If you are willing to lose all the snapshot-information, [...]

I'm afraid we can't do that: we want to keep the last 10 days of
snapshots, plus a few ones that we mark as
not-to-be-garbage-collected.

Thanks for the great input and suggestions!

Cheers,
-- 
intrigeri

Reply via email to