New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osd: try evicting after flushing is done #5630
Conversation
@wonzhq Do we always want to evict after a flush? I'm thinking that some objects might be written once and then read multiple times. Would this change mean that if a dirty object is evicted when it flushes, it would possibly be re-promoted for a read? Maybe this could be a configurable behaviour? |
@fiskn this PR just tries the evict after flush. It doesn't mean the evict will actually start. This depends on whether the object falls into the appropriate part of the histogram. And if we've decided to evict an object, this usually means the object won't be accessed in the near future. |
@wonzhq Ah right, thanks for explaining. That makes perfect sense now. |
@@ -11323,6 +11336,8 @@ bool ReplicatedPG::agent_maybe_evict(ObjectContextRef& obc) | |||
ctx->delta_stats.num_objects_omap--; | |||
ctx->delta_stats.num_evict++; | |||
ctx->delta_stats.num_evict_kb += SHIFT_ROUND_UP(obc->obs.oi.size, 10); | |||
if (after_flush) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be is_dirty() for clarity
This also needs a rebase.. @wonzhq do you mind updating? |
When the evict mode is not idle, after successfully flushing an object to the base pool, we can try to evict it. We don't need to clear the dirty bit in this case. Signed-off-by: Zhiqiang Wang <zhiqiang@xsky.com>
4a46ee6
to
341e3f9
Compare
Updated and rebased. @liewegas |
@athanatos This passed the test run, but it makes me nervous because I can't tell if this path is being taken. Any ideas? |
osd: try evicting after flushing is done Reviewed-by: Sage Weil <sage@redhat.com>
When the evict mode is not idle, after successfully flushing an object
to the base pool, we can try to evict it. We don't need to clear the
dirty bit in this case.
Signed-off-by: Zhiqiang Wang zhiqiang.wang@intel.com