Skip to content

SDSTOR-21407 Make per-service dev_type and size_pct configurable in i…#411

Open
xiaoxichen wants to merge 2 commits intoeBay:stable/v4.xfrom
xiaoxichen:config_ratio
Open

SDSTOR-21407 Make per-service dev_type and size_pct configurable in i…#411
xiaoxichen wants to merge 2 commits intoeBay:stable/v4.xfrom
xiaoxichen:config_ratio

Conversation

@xiaoxichen
Copy link
Copy Markdown
Collaborator

…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%.

…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-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 53.84615% with 12 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (stable/v4.x@88b936f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/lib/homestore_backend/hs_homeobject.cpp 53.84% 12 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

});
} 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);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if we have different final HSDevType for different service, it is better to print them respectively.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Comment thread docs/adr/blob-index-analyze.md Outdated
- **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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sequence is atomic < uint32 >, so it is 4B, and each slot is 8B?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docs/adr/blob-index-analyze.md Outdated
```
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%.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8K/ 4K = 2?

it should be ( (DataSize/8K) / 167 ) *4k * 1.01 = DataSize * 0.3%.

Comment thread docs/adr/blob-index-analyze.md Outdated
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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also put the capacity of a QLS SSD here to make it more clear

Comment thread docs/adr/blob-index-analyze.md Outdated
3. Hard memory = Index disk / 4096 × 12 bytes
(Allocator) (Always resident, non-negotiable)

4. Soft memory = min(Index disk × 10%, io_mem_size × 65%)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does Index disk × 10% mean?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to say keeping 10% of index in the memory for hot data (if any)

Signed-off-by: Xiaoxi Chen <xiaoxchen@ebay.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants