Skip to content

squid: os/bluestore: Fix problem with onode cache causing stalls - #70491

Merged
batrick merged 3 commits into
ceph:squidfrom
aclamk:aclamk-bs-onode-stall-fix-squid
Aug 4, 2026
Merged

batrick merged 3 commits into
ceph:squidfrom
aclamk:aclamk-bs-onode-stall-fix-squid

Conversation

@aclamk

@aclamk aclamk commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Elements in onode cache shards are evicted when new element is inserted into the cache.
In rare cases of cluster inactivity cache can be reduced, but not evicted.
Adjusting size at once will cause stall first time cache shard is accessed.
The solution is to dampen the effect by evicting only few onodes at a time.

In addition, mempool_thread gets ability to evicts some onodes right after PriorityCache Meta size is changed.

This is backport of: #65792
Fixes: https://tracker.ceph.com/issues/77268

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. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

aclamk added 3 commits July 23, 2026 17:21
Limits how many onodes can be evicted from OnodeCacheShard in one go.
Added bluestore_cache_meta_drop_limit that controls how fast
onodes can be evicted from cache.

Fixes: https://tracker.ceph.com/issues/77268

Signed-off-by: Adam Kupczyk <[email protected]>
(cherry picked from commit 305c0f8)
Add bluestore_cache_meta_evict_in_autotune configurable.
It allows to evict onodes as part of autotune process.
This makes onode CacheShards size adapt to PriorityCache Meta
memory allocation.

Fixes: https://tracker.ceph.com/issues/77268

Signed-off-by: Adam Kupczyk <[email protected]>
(cherry picked from commit 42b2986)
There are 2 cases when Collection::split_cache is used:
1) Merge Collections.
   It this case we get more elements in dest collection,
   but we do not want to trim by force as it might cause stall.
2) Split Collection
   Source cache is getting thinner, and dest cache is growing.
   Similarly, trimming dest will cause stall.

Decision:
It is better to not trim forcibly and relay on gradual trimming
from MempoolThread or client IO.

Fixes: https://tracker.ceph.com/issues/77268

Signed-off-by: Adam Kupczyk <[email protected]>
(cherry picked from commit d2f2d86)
@aclamk
aclamk requested a review from a team as a code owner July 23, 2026 17:24
@github-actions github-actions Bot added this to the squid milestone Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: bluestore_cache_meta_evict_in_autotune (global.yaml.in)
+ added: bluestore_cache_meta_evict_limit (global.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@github-actions github-actions Bot added the releng-audit-pass Release engineering: passed backport verification audit. label Jul 23, 2026
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath1-testing-20260724.101528-squid.

@Naveenaidu

Copy link
Copy Markdown
Contributor

@batrick batrick modified the milestones: squid, v19.2.6 Aug 4, 2026
@batrick
batrick merged commit dcd1260 into ceph:squid Aug 4, 2026
10 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants