[PATCH] Osd: temperature based object eviction for cache tiering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux