<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-forward-container"><br>
      <br>
      -------- Original Message --------
      <table class="moz-email-headers-table" border="0" cellpadding="0"
        cellspacing="0">
        <tbody>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject:
            </th>
            <td>Re: dm-cache with zero hit rate</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date: </th>
            <td>Fri, 02 Aug 2013 19:57:17 +0200</td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">From: </th>
            <td>Heinz Mauelshagen <a class="moz-txt-link-rfc2396E" href="mailto:heinzm@redhat.com"><heinzm@redhat.com></a></td>
          </tr>
          <tr>
            <th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
            <td>Steinar H. Gunderson <a class="moz-txt-link-rfc2396E" href="mailto:sgunderson@bigfoot.com"><sgunderson@bigfoot.com></a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <pre>On 08/02/2013 03:58 PM, Steinar H. Gunderson wrote:
> On Fri, Aug 02, 2013 at 09:23:44AM -0400, Mike Snitzer wrote:
>> Yes, it is surprising.  Curious to know if the promotions aren't
>> happening due to the IO scheduler somehow merging all your random small
>> IO.  We don't yet have a descrete counter to show the number of
>> migrations that were skipped due to sequential_threshold but that is
>> something we can add.
>>
>> But you can effectively disable the sequential_threshold by setting it
>> really high, e.g.:
>>
>> dmsetup message cache 0 sequential_threshold 16384
> I tried this, and it still doesn't appear to promote anything at all:
>
> cache: 0 23440891904 cache 913/8192 0 7021239 0 2049048 0 0 0 0 0 2 migration_threshold 2048 4 random_threshold 8 sequential_threshold 16384
>
> It's only been running for a few minutes, though.
>
> FWIW, earlier I ran it on only one single partition, and then it worked.
> So it's not like my kernel is completely broken, at least.

Doesn't seem so.

Because you succeeded on a partition, mind trying a small some GB mapping
with smaller block size too on top of your big RAID? Eventually apply 
the config you
used for your to your partition and adjust that to your large RAID?

If that fails as well, it looks like some strange device specific issue 
causing the failure.
If it succeeds, it seems to be a large size related one.

Heinz

>
>> Please write a file that is smaller than your specified
>> sequential_threshold, and then read it numerous times via direct IO,
>> e.g.:
>>
>> dd if=<your file> of=/dev/null iflag=direct bs=16K
> I did, with a 16 kB file (that should certainly be small enough, right?),
> executing the dd command 10000 times. Still nothing cached.
>
> /* Steinar */

</pre>
      <br>
    </div>
    <br>
  </body>
</html>