<div>There is also a subtle point here. If one of the older snapshots already "saw" a change to that block, which came on before a newer snapshot was started, then you will write to the new COW and not to the old. But as Dan says, that can still leave a lot of sloshing around... especially with data of the "hit each one rarely" type.</div>

<div> </div>
<div>There's an almost trivial variant on this, where you keep the (read-only) snapshots in a time-ordered sequence, and freeze the last snapshot COW at the same moment as you start the next snapshot. Then writing only ever hits the new snapshot COW, and reading from any older snapshot (virtual) volume involves figuring out which is the first after that to hold the block, but still involves reading only one block. I wonder why LVM does not do this. Perhaps Zumastor does? Or somebody else?<br>
 </div>
<div>Larry Dickson<br> </div>
<div><span class="gmail_quote">On 4/23/08, <b class="gmail_sendername">Dan Kegel</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:dank@kegel.com" target="_blank">dank@kegel.com</a>> wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Wed, Apr 23, 2008 at 8:57 PM, Ross Boylan <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ross@biostat.ucsf.edu" target="_blank">ross@biostat.ucsf.edu</a>> wrote:<br>
>  > > but<br>>  > > when you write to it, the system makes sure that unless it has<br>>  > > been done already, the block you're modifying are being copied<br>>  > > first from the "real" volume to COW volume before being modified<br>
>  > > in the "real" volume.<br>>  ><br>>  > And to be clear, the COW volumes of _all_ snapshots[1].  This is where<br>>  > the snapshot scaling problem arises.<br>>  Could someone say a bit more, because I definitely don't follow this.<br>
<br>If you have a single original volume, and you keep ten snapshots<br>of it, and then you write a block to the original volume, you<br>may end up needing to write eleven blocks.  Ouch!<br><br>Thus the write overhead of LVM snapshots scales poorly with the<br>
number of snapshots per volume.<br><br>Note that LVM snapshots scale well with the number of volumes,<br>but that's not interesting or surprising, as each volume is independent.<br>- Dan<br><br>_______________________________________________<br>
linux-lvm mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br></blockquote></div><br>