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
Attachments
For Gerrit Dashboard: MB-36754 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
117460,5 | MB-36754 Use available indexer stats | master | ns_server | Status: ABANDONED | 0 | 0 |
117781,9 | MB-36754 Add data_size_on_disk, log_space_on_disk stats | unstable | indexing | Status: MERGED | +2 | +1 |
117987,3 | MB-36754 Use indexer provided stats in calculations | master | ns_server | Status: ABANDONED | 0 | +1 |
118073,3 | MB-36754 Use indexer provided stats in calculations | master | ns_server | Status: MERGED | +2 | +1 |
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%.