From: Li Wang <liwang@ubuntukylin.com>
To: Sage Weil <sweil@redhat.com>
Cc: ceph-devel@vger.kernel.org,
MingXin Liu <mingxinliu@ubuntukylin.com>,
Li Wang <liwang@ubuntukylin.com>
Subject: [PATCH] Osd: temperature based object eviction for cache tiering
Date: Thu, 21 May 2015 21:34:05 +0800 [thread overview]
Message-ID: <cover.1432214851.git.liwang@ubuntukylin.com> (raw)
This is an implementation of temperature based object
eviction policy for cache tiering. The current eviction
policy is based only on the latest access time, without
considering the access frequency in the history. This
policy is apt to leave the just-accessed object in the
cache pool, even it will no longer be accessed. Obviously,
this policy will make bad choices in some scenarios.
This motivates us to present temperature based object
eviction policy, which makes eviction decision by considering
both latest access time and access frequency, while keeping
the simplicity of the current algorithm framework, and
making minimal revision to it. The algorithm is simple,
associate each hitset with a weight, the latest hitset
with the heaviest weight, say, 1000000. And the least
latest hitset with a lighter weight, decayed by an
user-defined factor, say, 50, then the least latest
hitset has a weight of 1000000*(100-50)/100=500000,
and so on. Each object in the cache pool will be calculated
a total weight according to its appearance in all the
hitsets, then those objects with the least total weights
are chosen as the eviction candidates. In fact, the
algorithm reduces to the current atime based eviction
policy by setting decay rate be 100.
The patches:
https://github.com/ceph/ceph/pull/4737
MingXin Liu (5):
Osd: add three fields to pg_pool_t
Mon: expose commands for temperature related setting
Osd: add a temperature based object eviction policy for cache tiering
Mon: add temperature support for existing cache related commands
Doc: add temperature related stuff in documents and test scripts
doc/dev/cache-pool.rst | 4 ++
doc/man/8/ceph.rst | 12 +++--
doc/rados/operations/pools.rst | 7 +++
qa/workunits/cephtool/test.sh | 14 ++++++
src/common/config_opts.h | 2 +
src/mon/MonCommands.h | 8 ++-
src/mon/OSDMonitor.cc | 101 ++++++++++++++++++++++++++++++++++---
src/osd/ReplicatedPG.cc | 110 ++++++++++++++++++++++-------------------
src/osd/osd_types.cc | 32 +++++++++++-
src/osd/osd_types.h | 49 ++++++++++++++++++
10 files changed, 274 insertions(+), 65 deletions(-)
--
1.9.1
next reply other threads:[~2015-05-21 13:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 13:34 Li Wang [this message]
2015-05-21 13:34 ` [PATCH 1/5] Osd: add three fields to pg_pool_t Li Wang
2015-05-21 13:34 ` [PATCH 2/5] Mon: expose commands for temperature related setting Li Wang
2015-05-21 14:29 ` Joao Eduardo Luis
2015-05-26 1:52 ` Li Wang
2015-05-21 13:34 ` [PATCH 3/5] Osd: add a temperature based object eviction policy for cache tiering Li Wang
2015-05-21 13:34 ` [PATCH 4/5] Mon: add temperature support for existing cache related commands Li Wang
2015-05-21 13:34 ` [PATCH 5/5] Doc: add temperature related stuff in documents and test scripts Li Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1432214851.git.liwang@ubuntukylin.com \
--to=liwang@ubuntukylin.com \
--cc=ceph-devel@vger.kernel.org \
--cc=mingxinliu@ubuntukylin.com \
--cc=sweil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.