<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: 16px;"><span class="Apple-style-span" style="font-family: arial; font-size: 13px;">Hi,<div>I  recently started using dm-thin module and first of all, thank you for the good work. It works great, well documented and the comments in the code are very useful.  I tried to run some performance tests using a high performance flash device and the performance of dm thin is about 30% of LVM performance on a full allocated thin provisioned volume. ( ie after all pages/blocks are allocated using dd).
 Performance test does only reads and no writes. <div><br></div><div>To reproduce the scenario easily, I tried same operations using ramdisk and dd. </div><div><br></div><div>To read 3.2G of data using dd, </div><div><br></div><div>   Raw Ramdisk takes - 2.5 seconds</div><div>   LVM Lun - takes 4 seconds</div><div>   TP Lun ( after fully allocated) - takes 18 seconds</div><div><br></div><div><br></div><div><br></div><div>Steps involved</div><div>------------------</div><div>1. Linux 3.2.0.rc4 version from <a href="http://kernel.org/" target="_blank">kernel.org</a></div><div> 3.2.0-rc4 #1 SMP Fri Dec 16 13:25:02 EST 2011 x86_64 x86_64 x86_64 GNU/Linux</div><div>2. LVM2.2.02.88</div><div>3. compiling and installing dm thin modules.</div><div>4. Create a ramdisk of size 4G.</div><div><br></div><div>Ramdisk Raw Read Test</div><div>--------------------------</div><div>[root@lab-dm-cn4 ~]# dd
 of=/dev/null if=/dev/ram bs=4096 count=786432</div><div><div>786432+0 records in</div><div>786432+0 records out</div><div>3221225472 bytes (3.2 GB) copied, 2.56607 s, 1.3 GB/s</div></div><div><br></div><div>LVM SETUP</div><div>------------------------</div><div><br></div><div>Create PV with 8M metadata on ramdisk , chunksize=8M in VG, lv uses 100%VG.</div><div><br></div><div><div>root@lab-dm-cn4 ~]# dd of=/dev/null if=/dev/6C067CWX00132-1/engineering bs=4096 count=$BLOCKS</div><div>                                786432+0 records in</div><div>                                786432+0 records out</div><div>                                3221225472 bytes (3.2 GB) copied, 4.06687 s, 792
 MB/s</div></div><div><br></div><div><br></div><div><br></div><div>DM THIN SETUP</div><div>-----------------------</div><div>Create metadata device of size 8M and data device of size 3G using dm-linear on ramdisk.</div><div>Create TP Pool using the above devices with page/block size of 8M.</div><div>Create TP LUN in the TP Pool.</div><div>Using dd, write 4k to every page in the TP LUN so that all pages are allocated.</div><div>using "dmsetup status" verify that all pages in the pool are allocated.</div><div><br></div><div><div>[root@lab-dm-cn4 ~]# dd of=/dev/null if=/dev/mapper/thin1 bs=4096 count=$BLOCKS</div><div>                                          786432+0 records in</div><div>                                          786432+0
 records out</div><div>                                          3221225472 bytes (3.2 GB) copied, 18.2166 s, 177 MB/s</div></div><div><br></div><div><br></div><div><br></div><div>I have attached the output file and the script file used for this test.  Any ideas / suggestions on what may be the bottle neck in dm-thin performance is much appreciated.</div><div><br></div><div>Thanks,</div><div>Jagan.</div></div><div><div><br></div><div><br><br class="Apple-interchange-newline"></div></div></span></span></div></div></body></html>