Skip to content
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

Merged
merged 1 commit into from Dec 31, 2015

Conversation

wonzhq
Copy link
Contributor

@wonzhq wonzhq commented Aug 21, 2015

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

@wonzhq wonzhq changed the title osd: do evict after flush osd: try evicting after flushing is done Aug 21, 2015
@fiskn
Copy link
Contributor

fiskn commented Sep 7, 2015

@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?

@wonzhq
Copy link
Contributor Author

wonzhq commented Sep 8, 2015

@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.

@fiskn
Copy link
Contributor

fiskn commented Sep 8, 2015

@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)
Copy link
Member

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

@liewegas liewegas self-assigned this Nov 24, 2015
@liewegas
Copy link
Member

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>
@wonzhq
Copy link
Contributor Author

wonzhq commented Dec 3, 2015

Updated and rebased. @liewegas

@liewegas
Copy link
Member

@athanatos This passed the test run, but it makes me nervous because I can't tell if this path is being taken. Any ideas?

liewegas added a commit that referenced this pull request Dec 31, 2015
osd: try evicting after flushing is done

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit cdc195a into ceph:master Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants