<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>I'm not sure if anybody saw my original mail, there may have been a race condition with me actually joining the mailing list.</p>
<p><br>
</p>
<p>I can confirm the performance regression, is caused my async io, turning this off in the lvm.conf gets back my performance.</p>
<p>We work in a libaio intensive environment, so there is contention for libaio ring.</p>
<p><br>
</p>
<p>I'm wondering if libaio should be on by default?</p>
<p><br>
</p>
<p>Thanks,</p>
<p><br>
</p>
<p>Ben<br>
</p>
<p><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Ben Sims<br>
<b>Sent:</b> 17 October 2019 15:59<br>
<b>To:</b> lvm-devel@redhat.com<br>
<b>Subject:</b> Performance regression between V2_02_177 and V2_02_180</font>
<div> </div>
</div>
<div>
<p>Hi lvm-devel</p>
<p><br>
</p>
<p>I'm trying to analyze a performance regression in short lived commands such as lvchange.</p>
<p><br>
</p>
<p><strong>V2_02_177<br>
</strong></p>
<p><strong></strong><br>
</p>
<p>time /sbin/lvchange -ay /dev/abc/def<br>
</p>
<p><br>
</p>
<p>real    0m0.085s<br>
user    0m0.000s<br>
sys    0m0.013s<br>
</p>
<p><br>
</p>
<p><strong>V2_02_180<br>
</strong></p>
<p><strong></strong><br>
</p>
<p>time /sbin/lvchange -ay /dev/abc/def<br>
</p>
<p><br>
</p>
<p>real    0m0.115s<br>
user    0m0.007s<br>
sys    0m0.007s<br>
</p>
<p><br>
</p>
<p>I confirmed these measurements independently with perf over the course of a long test calling lvchange many times. The difference in individual calls is small but adds up.<br>
</p>
<p><br>
</p>
<p>The reg first occurred due to commit</p>
<p><br>
</p>
<p><strong></strong></p>
<strong>commit db41fe6c5dab7ff66db9c0568f0e1e1b31657be3</strong><br>
<strong>Author: Alasdair G Kergon <agk@redhat.com></strong><br>
<strong>Date:   Mon Jan 22 18:17:58 2018 +0000</strong><br>
<br>
<strong>    lvmcache: Use asynchronous I/O when scanning devices.</strong><br>
<p><br>
</p>
<p>I notice that the new bcache is reading significantly more data 262144 bytes (two blocks of 131072 bytes from /dev/sda ) compared to 28672 bytes in 4k reads made in<strong> V2_02_177</strong>. Whats the rational for reading so much more data?</p>
<p><br>
</p>
<p>The extra overhead of this io estimated with strace does not appear to account for the slow down, but perhaps the processing of this data does?<br>
</p>
<p><br>
</p>
<p>I'm currently instrumenting the code, but thought i would ask on the mailing list.</p>
<p><br>
</p>
<p>Thanks,</p>
<p><br>
</p>
<p>Ben <br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>  <br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
</div>
</body>
</html>