All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Osd: temperature based object eviction for cache tiering
@ 2015-05-21 13:34 Li Wang
  2015-05-21 13:34 ` [PATCH 1/5] Osd: add three fields to pg_pool_t Li Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Li Wang @ 2015-05-21 13:34 UTC (permalink / raw)
  To: Sage Weil; +Cc: ceph-devel, MingXin Liu, Li Wang

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-26  1:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-21 13:34 [PATCH] Osd: temperature based object eviction for cache tiering Li Wang
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

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.