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/ReplicatedPG: fix promotion recency logic #6702

Merged
merged 2 commits into from Dec 31, 2015

Conversation

liewegas
Copy link
Member

http://tracker.ceph.com/issues/14320

Recency is defined as how many of the last N hitsets an object
must appear in in order to be promoted. The previous logic did
nothing of the sort... it checked for the object in any one of
the last N hitsets, which led to way to many promotions and killed
any chance of the cache performing properly.

While we are here, we can simplify the code to drop the max_in_*
fields (no longer necessary).

Note that we may still want a notion of 'temperature' that does
tolerate the object missing in one of the recent hitsets.. but
that would be different than recency, and should probably be
modeled after the eviction temperature model.

Backport: infernalis, hammer
Reported-by: Nick Fisk nick@fisk.me.uk
Signed-off-by: Sage Weil sage@redhat.com

@liewegas
Copy link
Member Author

Two small nits, otherwise looks good to me!

Recency is defined as how many of the last N hitsets an object
must appear in in order to be promoted.  The previous logic did
nothing of the sort... it checked for the object in any one of
the last N hitsets, which led to way to many promotions and killed
any chance of the cache performing properly.

While we are here, we can simplify the code to drop the max_in_*
fields (no longer necessary).

Note that we may still want a notion of 'temperature' that does
tolerate the object missing in one of the recent hitsets.. but
that would be different than recency, and should probably be
modeled after the eviction temperature model.

Backport: infernalis, hammer
Reported-by: Nick Fisk <nick@fisk.me.uk>
Signed-off-by: Sage Weil <sage@redhat.com>
Reported-by: xinxin shu <xinxin.shu@intel.com>
Signed-off-by: Sage Weil <sage@redhat.com>
@zhouyuan
Copy link
Contributor

@liewegas how do you think about back-porting this to hammer branch? I can do the work if you think it's OK.

@liewegas
Copy link
Member Author

liewegas commented Dec 22, 2015 via email

zhouyuan added a commit to zhouyuan/ceph that referenced this pull request Dec 23, 2015
Backport ceph#6702 (osd/ReplicatedPG: fix promotion recency logic) to Hammer.

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
zhouyuan added a commit to zhouyuan/ceph that referenced this pull request Dec 23, 2015
Backport ceph#6702 (osd/ReplicatedPG: fix promotion recency logic) to Hammer.

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
liewegas added a commit that referenced this pull request Dec 31, 2015
osd/ReplicatedPG: fix promotion recency logic

Reviewed-by: Samuel Just <sjust@redhat.com>
@liewegas liewegas merged commit 5dd1cb0 into ceph:master Dec 31, 2015
@liewegas liewegas deleted the wip-fix-recency branch December 31, 2015 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants