nautilus: os/bluestore: go beyond pinned onodes while trimming the cache.#39720
Merged
yuriw merged 1 commit intoceph:nautilusfrom Mar 4, 2021
Merged
nautilus: os/bluestore: go beyond pinned onodes while trimming the cache.#39720yuriw merged 1 commit intoceph:nautilusfrom
yuriw merged 1 commit intoceph:nautilusfrom
Conversation
aclamk
requested changes
Mar 1, 2021
src/common/options.cc
Outdated
|
|
||
| Option("bluestore_debug_max_cached_onodes", Option::TYPE_INT, Option::LEVEL_DEV) | ||
| .set_default(0) | ||
| .set_description(""), |
Contributor
There was a problem hiding this comment.
We need an explanation what it does.
One might face lack of cache trimming when there is a bunch of pinned entries on the top of Onode's cache LRU list. If these pinned entries stay in the state for a long time cache might start using too much memory causing OSD to go out of osd-memory-target limit. Pinned state tend to happen to osdmap onodes. The proposed patch preserves last trim position in the LRU list (if it pointed to a pinned entry) and proceeds trimming from that position if it wasn't invalidated. LRU nature of the list enables to do that safely since no new entries appear above the previously present entry while it's not touched. Fixes: https://tracker.ceph.com/issues/48729 Signed-off-by: Igor Fedotov <ifedotov@suse.com>
3c12caf to
05f7294
Compare
aclamk
approved these changes
Mar 2, 2021
Contributor
aclamk
left a comment
There was a problem hiding this comment.
I like this solution.
I guess it is best we can do without backporting huge parts of logic.
Contributor
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One might face lack of cache trimming when there is a bunch of pinned entries on the top of Onode's cache LRU list. If these pinned entries stay in the state for a long time cache might start using too much memory causing OSD to go out of osd-memory-target limit. Pinned state tend to happen to osdmap onodes.
The proposed patch preserves last trim position in the LRU list (if it pointed to a pinned entry) and proceeds trimming from that position if it wasn't invalidated. LRU nature of the list enables to do that safely since no new entries appear above the previously present entry while it's not touched.
This patch is specific to Nautilus since Octopus+ releases use a different pinning/cache trimming approach.
Fixes: https://tracker.ceph.com/issues/48729
Signed-off-by: Igor Fedotov ifedotov@suse.com
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 apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox