Repository navigation
os/bluestore: Fix problem with onode cache causing stalls - #65792
Conversation
Config Diff Tool Output+ added: bluestore_cache_meta_evict_limit (global.yaml.in)
+ added: bluestore_cache_meta_evict_in_autotune (global.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
|
jenkins test make check arm64 |
| @@ -2152,7 +2152,7 @@ void BlueStore::OnodeSpace::rename( | |||
|
|
|||
| o->oid = new_oid; | |||
| o->key = new_okey; | |||
| cache->_trim(); | |||
There was a problem hiding this comment.
I can see cache's _trim() call in BlueStore::BufferSpace::_finish_write() as well, shouldn't we update it too?
There was a problem hiding this comment.
Also there is _trim() call at the end of BlueStore::Collection::split_cache(). Wouldn't it be better to have it at the beginning hence making cache splitting more efficient (as no 'to-be-evicted' entries are processed)
There was a problem hiding this comment.
@ifed01
Regarding " _trim() in BlueStore::BufferSpace::_finish_write()".
This PR targets onode caching behaviour, so buffer cache is unrelated.
Can we suffer from similar affliction on kv, kv_onode or data caches?
The latency spike was observed on meta due to 2 reasons:
- meta tends to be largest
- onodes take significant time to destroy
My thinking is that maybe we should modify logic of PriorityCacheManager to not revoke memory allotment from caches if there is no pressure.
There was a problem hiding this comment.
@ifed01
Regarding split_cache().
I removed invoking _trim() completely.
Rationale:
- merging: trimming forcibly after merge can cause mini stalls
- splitting: trimming forcibly before split can force dropping elements that will fit perfectly after split
|
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! |
|
@aclamk - any plans to revive this PR? |
|
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. |
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/73353 Signed-off-by: Adam Kupczyk <[email protected]>
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/73353 Signed-off-by: Adam Kupczyk <[email protected]>
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. Signed-off-by: Adam Kupczyk <[email protected]>
5296197 to
d2f2d86
Compare
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.
Fixes: https://tracker.ceph.com/issues/73353
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.