From: liumingxin Date: Mon, 1 Jun 2015 08:50:31 +0000 (+0800) Subject: Doc: add write back throttling stuff in document and test scripts X-Git-Tag: v9.0.3~134^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7aba9476e6af0100c7d0945b591355f06b7bc2da;p=ceph.git Doc: add write back throttling stuff in document and test scripts Signed-off-by: Mingxin Liu Reviewed-by: Li Wang Suggested-by: Nick Fisk --- diff --git a/doc/dev/cache-pool.rst b/doc/dev/cache-pool.rst index f44cbd99ac4a..b749950c364b 100644 --- a/doc/dev/cache-pool.rst +++ b/doc/dev/cache-pool.rst @@ -153,6 +153,7 @@ The thresholds at which Ceph will flush or evict objects is specified relative to a 'target size' of the pool. For example:: ceph osd pool set foo-hot cache_target_dirty_ratio .4 + ceph osd pool set foo-hot cache_target_dirty_high_ratio .6 ceph osd pool set foo-hot cache_target_full_ratio .8 will begin flushing dirty objects when 40% of the pool is dirty and begin diff --git a/doc/man/8/ceph.rst b/doc/man/8/ceph.rst index f9502215a101..4e8b2ec5ce9b 100644 --- a/doc/man/8/ceph.rst +++ b/doc/man/8/ceph.rst @@ -876,7 +876,7 @@ Usage:: 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| + 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 @@ -926,6 +926,7 @@ Usage:: pgp_num|crush_ruleset|hashpspool|nodelete|nopgchange|nosizechange| hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|debug_fake_ec_pool| 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 {--yes-i-really-mean-it} diff --git a/doc/rados/operations/cache-tiering.rst b/doc/rados/operations/cache-tiering.rst index bf6f8e556502..3643db4e8006 100644 --- a/doc/rados/operations/cache-tiering.rst +++ b/doc/rados/operations/cache-tiering.rst @@ -219,6 +219,17 @@ For example, setting the value to ``0.4`` will begin flushing modified ceph osd pool set hot-storage cache_target_dirty_ratio 0.4 +When the dirty objects reaches a certain percentage of its capacity, flush dirty +objects with a higher speed. To set the ``cache_target_dirty_high_ratio``:: + + ceph osd pool set {cachepool} cache_target_dirty_high_ratio {0.0..1.0} + +For example, setting the value to ``0.6`` will begin aggressively flush diryt objects +when they reach 60% of the cache pool's capacity. obviously, we'd better set the value +between dirty_ratio and full_ratio:: + + ceph osd pool set hot-storage cache_target_dirty_high_ratio 0.6 + When the cache pool reaches a certain percentage of its capacity, the cache tiering agent will evict objects to maintain free capacity. To set the ``cache_target_full_ratio``, execute the following:: diff --git a/doc/rados/operations/pools.rst b/doc/rados/operations/pools.rst index 95ed7a6742ae..4696c7d562ff 100644 --- a/doc/rados/operations/pools.rst +++ b/doc/rados/operations/pools.rst @@ -348,6 +348,16 @@ You may set values for the following keys: :Default: ``.4`` +``cache_target_dirty_high_ratio`` + +:Description: The percentage of the cache pool containing modified (dirty) + objects before the cache tiering agent will flush them to the + backing storage pool with a higher speed. + +:Type: Double +:Default: ``.6`` + + ``cache_target_full_ratio`` :Description: The percentage of the cache pool containing unmodified (clean) @@ -486,6 +496,15 @@ You may get values for the following keys: :Type: Double +``cache_target_dirty_high_ratio`` + +:Description: The percentage of the cache pool containing modified (dirty) + objects before the cache tiering agent will flush them to the + backing storage pool with a higher speed. + +:Type: Double + + ``cache_target_full_ratio`` :Description: The percentage of the cache pool containing unmodified (clean) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 7e21363c18e8..9af5496825ae 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1341,6 +1341,11 @@ function test_mon_osd_tiered_pool_set() grep 'cache_target_dirty_ratio:[ \t]\+0.123' expect_false ceph osd pool set real-tier cache_target_dirty_ratio -.2 expect_false ceph osd pool set real-tier cache_target_dirty_ratio 1.1 + ceph osd pool set real-tier cache_target_dirty_high_ratio .123 + ceph osd pool get real-tier cache_target_dirty_high_ratio | \ + grep 'cache_target_dirty_high_ratio:[ \t]\+0.123' + expect_false ceph osd pool set real-tier cache_target_dirty_high_ratio -.2 + expect_false ceph osd pool set real-tier cache_target_dirty_high_ratio 1.1 ceph osd pool set real-tier cache_target_full_ratio .123 ceph osd pool get real-tier cache_target_full_ratio | \ grep 'cache_target_full_ratio:[ \t]\+0.123' @@ -1380,6 +1385,10 @@ function test_mon_osd_tiered_pool_set() expect_false ceph osd pool get fake-tier cache_target_dirty_ratio expect_false ceph osd pool set fake-tier cache_target_dirty_ratio -.2 expect_false ceph osd pool set fake-tier cache_target_dirty_ratio 1.1 + expect_false ceph osd pool set fake-tier cache_target_dirty_high_ratio .123 + expect_false ceph osd pool get fake-tier cache_target_dirty_high_ratio + expect_false ceph osd pool set fake-tier cache_target_dirty_high_ratio -.2 + expect_false ceph osd pool set fake-tier cache_target_dirty_high_ratio 1.1 expect_false ceph osd pool set fake-tier cache_target_full_ratio .123 expect_false ceph osd pool get fake-tier cache_target_full_ratio expect_false ceph osd pool set fake-tier cache_target_full_ratio 1.0