diff options
| author | Joe Thornber <ejt@redhat.com> | 2014-10-22 09:30:58 -0400 |
|---|---|---|
| committer | Mike Snitzer <snitzer@redhat.com> | 2014-11-10 15:25:29 -0500 |
| commit | b155aa0e5a81ea1f05ff7aced0ec8e34c980c19e (patch) | |
| tree | 56f73848b2e70f8a9eb4d97d51b742fc93c3ad0f /Documentation/device-mapper | |
| parent | 41abc4e1af369bb5438eaee398e3beee690cc8ca (diff) | |
dm cache policy mq: tweak algorithm that decides when to promote a block
Rather than maintaining a separate promote_threshold variable that we
periodically update we now use the hit count of the oldest clean
block. Also add a fudge factor to discourage demoting dirty blocks.
With some tests this has a sizeable difference, because the old code
was too eager to demote blocks. For example, device-mapper-test-suite's
git_extract_cache_quick test goes from taking 190 seconds, to 142
(linear on spindle takes 250).
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'Documentation/device-mapper')
| -rw-r--r-- | Documentation/device-mapper/cache-policies.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/device-mapper/cache-policies.txt b/Documentation/device-mapper/cache-policies.txt index 66c2774c0c64..7746e5dbfd40 100644 --- a/Documentation/device-mapper/cache-policies.txt +++ b/Documentation/device-mapper/cache-policies.txt | |||
| @@ -58,9 +58,9 @@ since spindles tend to have good bandwidth. The io_tracker counts | |||
| 58 | contiguous I/Os to try to spot when the io is in one of these sequential | 58 | contiguous I/Os to try to spot when the io is in one of these sequential |
| 59 | modes. | 59 | modes. |
| 60 | 60 | ||
| 61 | Internally the mq policy maintains a promotion threshold variable. If | 61 | Internally the mq policy determines a promotion threshold. If the hit |
| 62 | the hit count of a block not in the cache goes above this threshold it | 62 | count of a block not in the cache goes above this threshold it gets |
| 63 | gets promoted to the cache. The read, write and discard promote adjustment | 63 | promoted to the cache. The read, write and discard promote adjustment |
| 64 | tunables allow you to tweak the promotion threshold by adding a small | 64 | tunables allow you to tweak the promotion threshold by adding a small |
| 65 | value based on the io type. They default to 4, 8 and 1 respectively. | 65 | value based on the io type. They default to 4, 8 and 1 respectively. |
| 66 | If you're trying to quickly warm a new cache device you may wish to | 66 | If you're trying to quickly warm a new cache device you may wish to |
