From: "BK, GirishKumar"
Subject: dm-cache: Promote-Demote Policy. How it works ?
Date: Mon, 9 Feb 2015 13:19:44 +0000
Message-ID:
Reply-To: device-mapper development
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8898368880165525843=="
Return-path:
Content-Language: en-US
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Sender: dm-devel-bounces@redhat.com
Errors-To: dm-devel-bounces@redhat.com
To: "dm-devel@redhat.com"
List-Id: dm-devel.ids
--===============8898368880165525843==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_D0FEB1C511407GirishKumarBKnetappcom_"
--_000_D0FEB1C511407GirishKumarBKnetappcom_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
HI,
I'm new and trying to understand how exactly the "read_promote_adjustment" =
and "write_promote_adjustment" work in dm-cache. From the description in th=
e http://lxr.free-electrons.com/source/Documentation/device-mapper/cache-po=
licies.txt#L45 its not clear as to how promotion works.
For example:
61 Internally the mq policy maintains a promotion threshold =
variable. If
62 the hit count of a block not in the cache goes above this=
threshold it
63 gets promoted to the cache.
Here, the hit count is mentioned for the block not in cache. Which means t=
hat, blocks are not moved to cache unless there are susequent requests for =
the same block until the read_promote_thresold is reached. Meaning all tho=
se time the data was being read from slower disk. Why isn't the block move=
d to cache on first miss ?
What does write_promote_adjustment mean here ? Meaning after this count rea=
ches some threshold ( not sure how this count is incremented ?) then the di=
rty data from cache is written to slow disk ?
Can anyone please the scenarios under which each of the counters used ?
Thanks,
/Girish BK
45 'read_promote_adjustment '
46 'write_promote_adjustment '
47 'discard_promote_adjustment '
--_000_D0FEB1C511407GirishKumarBKnetappcom_
Content-Type: text/html; charset="iso-8859-1"
Content-ID:
Content-Transfer-Encoding: quoted-printable
HI,
I’m new and try=
ing to understand how exactly the “read_promote_adjustment” and=
“write_promote_adjustment” work in dm-cache. From the descript=
ion in the http://lxr.free-electrons.com/source/Documentation/de=
vice-mapper/cache-policies.txt#L45 its not clear as to how promotion wo=
rks.
For example:
61 Internally t=
he mq policy maintains a promotion threshold variable. If
62 the hit count of a block not in the =
cache goes above this threshold it
63 gets promoted to the cache.
Here, the hit count is =
mentioned for the block not in cache. Which means that, blocks are not mov=
ed to cache unless there are susequent requests for the same block until th=
e read_promote_thresold is reached. Meaning all those time the data was be=
ing read from slower disk. Why isn’t the block moved to cache on fir=
st miss ?
What d=
oes write_promote_adjustment mean here ? Meaning after this count reaches s=
ome threshold ( not sure how this count is incremented ?) then the dirty da=
ta from cache is written to slow disk ?
Can anyone please the scenarios under which each=
of the counters used ?
Thanks,
/Girish BK=
45 'read_promote_adjustment <value>'
46 'write_promote_adjustment &l=
t;value>'
47 'discard_promote_adjustment =
<value>'
--_000_D0FEB1C511407GirishKumarBKnetappcom_--
--===============8898368880165525843==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============8898368880165525843==--