Repository navigation
Conversation
|
jenkins test make check |
a9dc532 to
5e05898
Compare
|
I like the idea, but I am skeptical if it can work. Is |
Hi Adam. May be I'm missing something your comment but the idea is that I switch to different sorting order (R1) completely. So R isn't in use any more. And R1 is |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
When operating in best-fit mode allocator performs chunk lookups through size-sorted "range_size_tree" container. This is done in two stages: 1) Use container's lower_bound() to search for the first available long enough chunk. 2) Iterate sequentially to locate properly aligned chunk, starting from the position obtained at step 1) Step 2) might require significant efforts for bluefs allocations (which uses longer allocation unit than bluestore min_alloc_size, e.g. 64K vs. 4K) if space is highly fragmented. Plenty of potentially available chunks might be unaligned to 64K boundary and once aligned they aren't long enough any more. Hence the proposed solution is to prepend original sorting key (full_size + offset) with "aligned" chunk size. Hence range_size_tree will group chunks using bluefs aligned sizes and then sort them within each group using full size + chunk offset. E.g. chunks will be sorted in the following manner for bluefs and bluestore alloc sizes equal to 0x10000 and 0x1000 respectively ... 0x200000~10000 0x210000~10000 0x10f000~10000 0x15f000~10000 0x12f000~11000 0x38000~18000 ... 0x0~20000 0x400000~20000 0x501000~21000 0x101000~22000 0x601000~22000 ... Signed-off-by: Igor Fedotov <[email protected]>
Signed-off-by: Igor Fedotov <[email protected]>
5e05898 to
8776d96
Compare
|
@ifed01 sorry, Iv'e been swamped (not a new problem, but the truth). If Adam can't review I will try to do one as soon as I can. |
|
@ifed01 only comment right now is that this looks like it should be reviewable as it's not terribly complex. What do you think about Adam's comment? Can we prove or disprove his concerns through testing? |
@markhpc - either I didn't get Adam's comment or he didn't get the idea behind the patch :) |
| template<typename KeyType1, typename KeyType2> | ||
| bool compare(const KeyType1& lhs, const KeyType2& rhs, | ||
| uint64_t unit) const { | ||
| if (unit) { |
There was a problem hiding this comment.
For shorter_t the ordering is:
- aligned size
- normal size
- offset
This has following consequences:
A) when allocating for BlueFS 128K
aligned 128K, normal size 136K (4K pre, 4K post alignment)
has priority over
aligned 128K, normal size 140K (12K pre)
B) when allocating for BlueStore 132K
aligned 64K, normal size 132K (32K pre, 36K post alignment)
will not be found by lower_bound() that is in invoked with range_t{0, 132K, 64K}
I think that A is a just a nuisance, it does not make it worse then baseline.
The B accelerates fragmentation more then in baseline.
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
When operating in best-fit mode allocator performs chunk lookups through size-sorted "range_size_tree" container. This is done in two stages:
long enough chunk.
starting from the position obtained at step 1)
Step 2) might require significant efforts for bluefs allocations (which uses longer allocation unit than bluestore min_alloc_size, e.g. 64K vs. 4K) if space is highly fragmented. Plenty of potentially available chunks might be unaligned to 64K boundary and once aligned they aren't long enough any more.
Hence the proposed solution is to prepend original sorting key (full_size + offset) with "aligned" chunk size. Hence range_size_tree will group chunks using bluefs aligned sizes and then sort them within each group using full size + chunk offset. E.g. chunks will be sorted in the following manner for bluefs and bluestore alloc sizes equal to 0x10000 and 0x1000 respectively
...
0x200000~10000
0x210000~10000
0x10f000~10000
0x15f000~10000
0x12f000~11000
0x38000~18000
...
0x0~20000
0x400000~20000
0x501000~21000
0x101000~22000
0x601000~22000
...
Fixes: https://tracker.ceph.com/issues/62815
Signed-off-by: Igor Fedotov [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows