From 738d64c7e4023e7bb73f3630cea776abf87e5caa Mon Sep 17 00:00:00 2001 From: MingXin Liu Date: Thu, 21 May 2015 21:08:13 +0800 Subject: [PATCH] Doc: add temperature related stuff in documents and test scripts Signed-off-by: MingXin Liu Reviewed-by: Li Wang --- doc/man/8/ceph.rst | 5 +++-- doc/rados/operations/pools.rst | 14 ++++++++++++++ src/test/librados/tier.cc | 12 ++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/man/8/ceph.rst b/doc/man/8/ceph.rst index 37bb897262631..72d87dd0484bc 100644 --- a/doc/man/8/ceph.rst +++ b/doc/man/8/ceph.rst @@ -884,7 +884,7 @@ Only for tiered pools:: ceph osd pool get hit_set_type|hit_set_period|hit_set_count|hit_set_fpp| target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio| cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age| - min_read_recency_for_promote + min_read_recency_for_promote|hit_set_grade_decay_rate|hit_set_search_last_n Only for erasure coded pools:: @@ -934,7 +934,8 @@ Usage:: target_max_bytes|target_max_objects|cache_target_dirty_ratio| cache_target_dirty_high_ratio| cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid| - min_read_recency_for_promote|write_fadvise_dontneed + min_read_recency_for_promote|write_fadvise_dontneed|hit_set_grade_decay_rate| + hit_set_search_last_n {--yes-i-really-mean-it} Subcommand ``set-quota`` sets object or byte limit on pool. diff --git a/doc/rados/operations/pools.rst b/doc/rados/operations/pools.rst index 11bf1d4b30d9b..0babf071c300d 100644 --- a/doc/rados/operations/pools.rst +++ b/doc/rados/operations/pools.rst @@ -441,6 +441,20 @@ You may set values for the following keys: .. _cache_min_flush_age: +``hit_set_grade_decay_rate`` +:Description: Temperature decay rate between two successive hit_sets +:Type: Integer +:Valid Range: 0 - 100 +:Default: ``20`` + + +``hit_set_grade_search_last_n`` +:Description: Count at most N appearance in hit_sets for temperature calculation +:Type: Integer +:Valid Range: 0 - hit_set_count +:Default: ``1`` + + ``cache_min_flush_age`` :Description: The time (in seconds) before the cache tiering agent will flush diff --git a/src/test/librados/tier.cc b/src/test/librados/tier.cc index 6c665d149cc5a..08f6a84f48abf 100644 --- a/src/test/librados/tier.cc +++ b/src/test/librados/tier.cc @@ -2406,6 +2406,12 @@ TEST_F(LibRadosTwoPoolsPP, PromoteOn2ndRead) { ASSERT_EQ(0, cluster.mon_command( set_pool_str(cache_pool_name, "min_read_recency_for_promote", 1), inbl, NULL, NULL)); + ASSERT_EQ(0, cluster.mon_command( + set_pool_str(cache_pool_name, "hit_set_grade_decay_rate", 20), + inbl, NULL, NULL)); + ASSERT_EQ(0, cluster.mon_command( + set_pool_str(cache_pool_name, "hit_set_search_last_n", 1), + inbl, NULL, NULL)); // wait for maps to settle cluster.wait_for_latest_osdmap(); @@ -4759,6 +4765,12 @@ TEST_F(LibRadosTwoPoolsECPP, PromoteOn2ndRead) { ASSERT_EQ(0, cluster.mon_command( set_pool_str(cache_pool_name, "min_read_recency_for_promote", 1), inbl, NULL, NULL)); + ASSERT_EQ(0, cluster.mon_command( + set_pool_str(cache_pool_name, "hit_set_grade_decay_rate", 20), + inbl, NULL, NULL)); + ASSERT_EQ(0, cluster.mon_command( + set_pool_str(cache_pool_name, "hit_set_search_last_n", 1), + inbl, NULL, NULL)); // wait for maps to settle cluster.wait_for_latest_osdmap(); -- 2.39.5