Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
6.5.0
-
Untriaged
-
Unknown
Description
Currently, ns_server is using it's own calculation for computing "frag_percent" and "avg_item_size" values. Both these stats are dependent on data_size stat value. Any change to indexer data_size stat will impact the "frag_percent" and "avg_item_size" values. Also, "frag_percent" depends on "disk_size" value which has been changed as a part of MB-31787. This led to reporting incorrect fragmentation percentage on the UI (MB-36613)
Instead of ns_server calculating these values, please use the values from indexer stats. Indexer periodic stats already exposes "frag_percent" stat. From build 6.5.0-4750, another stat "avg_item_size" is also exposed
Varun Velamuri, I think that the fragmention calculation you provided is incorrect. Can you please confirm?
The way I understand the stats, data_size_on_disk is the size of valid data on disk, while log_space_on_disk is more or less the total size of disk storage being used (by valid data and garbage). So in the fully compacted case where there's no garbage on disk, you'd expect to see data_size_on_disk be equal to log_space_on_disk. You'd also expect to see no fragmentation (or 0%). Your calculation, though, will give a fragmentation of 100%.