Extend eblob summary statistics for defragmentation status
shaitan opened this issue · comments
Current state
Currently, eblob summary has follow statistics:
records_removed
- total number of removed records in all blobsrecords_removed_size
- total size of all removed records in all blobswant_defrag
- sum ofwant_defrag
of all blobs
Problem
There is no statistics that shows the need and potential profit from defragmentation:
want_defrag
is useless because it mixeswant_defrag
of all blobsrecords_removed
andrecords_removed_size
are about all removed records from all blobs and don't show how many space will be freed by defragmentation
What is wanted to be changed
Add new statistics or change current statistics if it is possible. These statistics should show:
- the need for defragmentation: 0 - defragmentation is useless now, 1 - defragmentation will make a profit
- current profit from defragmentation: how many resources will be freed (disk space, fd etc.)
like!
Update
- "profit from defragmentation" won't be implemented
summary:want_defrag
will take one of follow values:1
- when there is at least one unsorted blob or blob withwant_defrag
equal to1 (EBLOB_DEFRAG_NEEDED)
or2 (EBLOB_REMOVE_NEEDED)
0
- in all other cases