SDSTOR-21407 Make per-service dev_type and size_pct configurable in i…#411
Conversation
…nit_homestore
Add HSDevTypeOverride enum and per-service {meta,log,index,replication}_{dev_type,size_pct}
fields to HSBackendSettings. Defaults are AUTO/-1.0 so existing hybrid/single mode logic
is fully preserved. When a config value is set it overrides the built-in default via
resolve_dev_type() and resolve_size_pct() helpers.
Also tune standalone (single-device) defaults: meta/index 5%- >1%, replication 79%->87%.
Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## stable/v4.x #411 +/- ##
==============================================
Coverage ? 53.01%
==============================================
Files ? 36
Lines ? 5302
Branches ? 657
==============================================
Hits ? 2811
Misses ? 2199
Partials ? 292 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }); | ||
| } else { | ||
| auto run_on_type = has_fast_dev ? homestore::HSDevType::Fast : homestore::HSDevType::Data; | ||
| LOGD("Running with Single mode, all service on {}", run_on_type); |
There was a problem hiding this comment.
nit: if we have different final HSDevType for different service, it is better to print them respectively.
| - **Allocator overhead:** ~0.2% of S | ||
| - Uses `FixedBlkAllocator` (4KB fixed block size) | ||
| - Maintains all free blocks in memory via `folly::MPMCQueue` | ||
| - Each slot: 12 bytes (4B blk_num_t + 8B atomic sequence) |
There was a problem hiding this comment.
sequence is atomic < uint32 >, so it is 4B, and each slot is 8B?
There was a problem hiding this comment.
Thanks, nice catch, I copied this from the GDB result from Mehdi but actually he was in older version where BlkId (6B) was used for MPMCQ , 6+4=10 then padded to 12.
In 7.x we are using blk_num_t instead of blk_idwhich is 4B , then no padding is needed
| ``` | ||
| Worst case assuming blob size is 8KB, the Index size should be 0.61% of DataSize | ||
|
|
||
| (DataSize/8K)*(4KB/167)*1.01 ==> DataSize *1.01/167 = DataSize * 0.61%. |
There was a problem hiding this comment.
8K/ 4K = 2?
it should be ( (DataSize/8K) / 167 ) *4k * 1.01 = DataSize * 0.3%.
| Now we use 45% of META drive (200GB*45% =90GB) on HDD SKUs. The number is generally correct as worst case we can consume up to 60GB. | ||
| Shrinking it down from 90GB to 60GB saves 60MB memory which is negligible. | ||
| #### [QLC SKU] | ||
| 5% of QLC size makes it into 5721.96 GB, as a result it consumes 18GB memory for allocator. |
There was a problem hiding this comment.
can you also put the capacity of a QLS SSD here to make it more clear
| 3. Hard memory = Index disk / 4096 × 12 bytes | ||
| (Allocator) (Always resident, non-negotiable) | ||
|
|
||
| 4. Soft memory = min(Index disk × 10%, io_mem_size × 65%) |
There was a problem hiding this comment.
what does Index disk × 10% mean?
There was a problem hiding this comment.
trying to say keeping 10% of index in the memory for hot data (if any)
Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
|
LGTM, but I’m a bit confused about the use case for config dev_type configurable. What is its priority compared to the device type detected by HO? Since the dev info used by HS is detected by HO, but the vdev creation relies on the parameters specified in HO’s |
|
…nit_homestore
Add HSDevTypeOverride enum and per-service {meta,log,index,replication}_{dev_type,size_pct} fields to HSBackendSettings. Defaults are AUTO/-1.0 so existing hybrid/single mode logic is fully preserved. When a config value is set it overrides the built-in default via resolve_dev_type() and resolve_size_pct() helpers.
Also tune standalone (single-device) defaults: meta/index 5%- >1%, replication 79%->87%.