[linux-lvm] The feasibility of implementing an alternative snapshot approach

Zhiyong Ye yezhiyong at bytedance.com
Wed Jan 4 16:12:28 UTC 2023


Hi Zdenek,

Thank you for your reply.

Snapshots of thinlv are indeed more efficient compared to standard lv, 
this is because data blocks can be shared between snapshot and original 
thinlv. But there is also a performance loss after thinlv creates a 
snapshot. This is because the first write to the snapshotted thinlv 
requires not only allocating a new chunk but also copying the old data.

Here are some performance data and a discussion of the thinlv snapshot:

https://listman.redhat.com/archives/linux-lvm/2022-June/026200.html

Regards,

Zhiyong

在 1/4/23 10:09 PM, Zdenek Kabelac 写道:
> Dne 04. 01. 23 v 9:00 Zhiyong Ye napsal(a):
>> Dear all,
>>
>> The current standard lv implementation of snapshots is COW 
>> (Copy-on-write), which creates snapshots very quickly. However, the 
>> first write performance of the original lv will be poor after creating 
>> a snapshot because of COW. Moreover, the more snapshots there are, the 
>> worse the performance of the original lv will be.
>>
>> I tested the random read/write performance when the original lv was 
>> created with different number of snapshots. The data is shown below:
>> Number of snapshots  Randread(iops)  Randwrite(iops)
>>          0                21989           22034
>>          1                10048           10041
>>          2                6770            6773
>>          3                5375            5378
>>
>> There are scenarios where the performance of the original lv is more 
>> demanding, and the speed of snapshot creation is not as strong a 
>> requirement. Because it is the original lv that will actually be used, 
>> and the snapshot is only a secondary function. Therefore snapshots 
>> using the COW approach will not meet the needs of this scenario.
>>
>> Therefore, is it feasible to implement another way of taking 
>> snapshots? Let's say the first snapshot is created as a full snapshot, 
>> and all subsequent snapshots are based on incremental data from the 
>> previous snapshot.
> 
> Hi
> 
> Have you played with thin provisioning - as that's the answer to the 
> slow snapshots.
> 
> Regards
> 
> Zdenek
> 



More information about the linux-lvm mailing list