Skip to content

nautilus: os/bluestore: go beyond pinned onodes while trimming the cache.#39720

Merged
yuriw merged 1 commit intoceph:nautilusfrom
ifed01:wip-ifed-fix-no-cache-trim-nau
Mar 4, 2021
Merged

nautilus: os/bluestore: go beyond pinned onodes while trimming the cache.#39720
yuriw merged 1 commit intoceph:nautilusfrom
ifed01:wip-ifed-fix-no-cache-trim-nau

Conversation

@ifed01
Copy link
Contributor

@ifed01 ifed01 commented Feb 26, 2021

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

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@ifed01 ifed01 added this to the nautilus milestone Feb 26, 2021
@ifed01 ifed01 changed the title os/bluestore: go beyond pinned onodes while trimming the cache. nautilus: os/bluestore: go beyond pinned onodes while trimming the cache. Mar 1, 2021
Copy link
Contributor

@aclamk aclamk left a comment

Choose a reason for hiding this comment

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

Good patching stuff.


Option("bluestore_debug_max_cached_onodes", Option::TYPE_INT, Option::LEVEL_DEV)
.set_default(0)
.set_description(""),
Copy link
Contributor

Choose a reason for hiding this comment

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

We need an explanation what it does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aclamk - fixed

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>
@ifed01 ifed01 force-pushed the wip-ifed-fix-no-cache-trim-nau branch from 3c12caf to 05f7294 Compare March 1, 2021 22:36
Copy link
Contributor

@aclamk aclamk left a comment

Choose a reason for hiding this comment

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

I like this solution.
I guess it is best we can do without backporting huge parts of logic.

@ifed01 ifed01 added needs-qa nautilus-batch-1 nautilus point releases labels Mar 2, 2021
@yuriw
Copy link
Contributor

yuriw commented Mar 2, 2021

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.

3 participants