]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: Improve fragmentation calculation
authorAdam Kupczyk <akupczyk@ibm.com>
Thu, 26 Jan 2023 12:21:28 +0000 (12:21 +0000)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Sat, 17 Aug 2024 10:54:22 +0000 (17:54 +0700)
commit477078b3b47011897f482e831c47a72a71fe0d80
tree09965caddaf76a3087692b1e4ab7e67698a2d7dd
parent43e9189e8a32ceb0c7b6e0b874378f3913a35956
os/bluestore: Improve fragmentation calculation

The fragmentation is calculated by giving value to each free chunk.
Simplified, byte chunk size X*2 is 1.1 more worth then byte in chunk size X.
This logic is not very useful when chunks are really large.
So, for large chunks (>8MB) we change value coefficient to 1.02.

Overall, the change is intended so split into large chunks will only slightly
increase fragmentation, but preserving the sharp increase of fragmentation when
small chunks start dominating.

Partially fixes: https://tracker.ceph.com/issues/58022

Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit 1ca6e1f0389f1894bdc91ca3c872b17fe2b3fae1)
src/os/bluestore/Allocator.cc