<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
adding this to lvm-devel mailing list also.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Pawan</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Pawan Sharma<br>
<b>Sent:</b> Wednesday, October 12, 2022 10:42 PM<br>
<b>To:</b> linux-lvm@redhat.com <linux-lvm@redhat.com><br>
<b>Cc:</b> Mitta Sai Chaithanya <mittas@microsoft.com>; Kapil Upadhayay <kupadhayay@microsoft.com><br>
<b>Subject:</b> LVM2 : performance drop even after deleting the snapshot</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi Everyone,</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
We are evaluating lvm2 snapshots and doing performance testing on it. This is what we are doing :</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<ol>
<li><span>dump some data to lvm2 volume (using fio)</span></li><li><span>take the snapshot</span></li><li><span>delete the snapshot (no IOs anywhere after creating the snapshot)</span></li><li><span>run the fio on lvm2 volume</span></li></ol>
<div><span>Here as you can see, we are just creating the snapshot and immediately deleting it. There are no IOs to the main volume or anywhere. When we run the fio after this (step 4) and we see around 50% drop in performance with reference to the number we
 get in step 1.</span></div>
<div><span><br>
</span></div>
<div><span>It is expected to see a performance drop if there is a snapshot because of the COW. But here we deleted the snapshot, and it is not referring to any data also. We should not see any performance drop here.</span></div>
<div><span><br>
</span></div>
<div><span>Could someone please help me understand this behavior. Why are we seeing the performance drop in this case? It seems like we deleted the snapshot but still it is not deleted, and we are paying the COW penalty.</span></div>
<div><span><br>
</span></div>
<div><span>System Info:</span></div>
<div><span><br>
</span></div>
<div><span>OS : ubuntu 18.04</span></div>
<div><span>Kernel : 5.4.0</span></div>
<div><span><span class="x_ContentPasted0" style="color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255); display:inline!important"><br>
</span></span></div>
<div><span><span class="x_ContentPasted0" style="color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255); display:inline!important"># lvm version</span><br class="x_ContentPasted0" style="box-sizing:border-box; color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255)">
</span></div>
<div><span><span class="x_ContentPasted0" style="box-sizing:border-box; color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255)"><span class="x_ContentPasted0" style="box-sizing:border-box">  </span>LVM version:<span class="x_ContentPasted0" style="box-sizing:border-box">     </span>2.02.176(2)
 (2017-11-03)</span><br class="x_ContentPasted0" style="box-sizing:border-box; color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255)">
<span class="x_ContentPasted0" style="box-sizing:border-box; color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255)"><span class="x_ContentPasted0" style="box-sizing:border-box">  </span>Library version: 1.02.145 (2017-11-03)</span><br class="x_ContentPasted0" style="box-sizing:border-box; color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255)">
<span class="x_ContentPasted0" style="box-sizing:border-box; color:rgb(36,36,36); font-size:14px; background-color:rgb(255,255,255)"><span class="x_ContentPasted0" style="box-sizing:border-box">  </span>Driver version:<span class="x_ContentPasted0" style="box-sizing:border-box">  </span>4.41.0</span><br>
</span></div>
<div><span><br>
</span></div>
<div><span>We also tried on latest ubuntu with newer version of LVM. We got the same behavior.</span></div>
<div><span><br>
</span></div>
<div><span>Any help/pointers would be appreciated. Thanks in advance.</span></div>
<div><span><br>
</span></div>
<div><span>Regards,</span></div>
<div>Pawan</div>
</div>
</div>
</body>
</html>