<div dir="ltr"><div>Ping!</div><div><br></div>I'd like to generalize my question to what is the general memory footprint of dm-cache. Does dm-cache keeps all metadata in memory or only part of it? Are there any other memory overheads? Are the metadata pinned or dynamically cached, according to available memory? I need to know such information in order to tell whether my system has currently enough resources to create a dm-cache target.<div><br><div><div>I understand that the metadata size is dictated by the size of the SSD and the size of the disk doesn't have anything to do with it. To test how memory utilization is affected, I created one hundred 1 GB dm-cache targets using 128 KB cache block size. I calculated the size of the metadata according to <a href="https://www.redhat.com/archives/dm-devel/2012-December/msg00046.html" target="_blank">https://www.redhat.com/archives/dm-devel/2012-December/msg00046.html</a>, which is 4.12 MB per dm-cache target. Memory utilization did increase but not as much as I expected: it increased by 183 MB and not by 4.12*100 which would be the case if all metadata were kept in memory. (I didn't do any I/O to the dm-cache targets.)</div></div></div><div><br></div><div>If this information is not readily available, are there any specific parts in the code I should focus in order to figure  this out?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 17, 2015 at 12:22 PM, Thanos Makatos <span dir="ltr"><<a href="mailto:thanos.makatos@onapp.com" target="_blank">thanos.makatos@onapp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is there some formula that could indicate the metadata memory footprint of dm-cache for given SSD and HDD capacities? Is there anything else that would affect the metadata footprint (e.g. write-through vs. write back, cache line size, etc.)?</div>
</blockquote></div><br></div></div>