<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">another thing we do is some kind of Defrag of the virtual disk files, not sure how effective it is. The idea is to re-arrange blocks with vhd file so sectors are sorted by their absolute disk offsets (not the logical offsets within the disk file). this way, for at least sequential virtual disk access, disk heads will move to the same direction, without going back and forth.<BR><BR>--- On <B>Wed, 5/18/11, Huihong Luo <I><huisinro@yahoo.com></I></B> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Huihong Luo <huisinro@yahoo.com><BR>Subject: [vbox-dev] Fw: Re: some suggestions to improve vhd disks<BR>To: "VirtualBox developer's list" <vbox-dev@virtualbox.org><BR>Date: Wednesday, May 18, 2011, 11:05 PM<BR><BR>
<DIV id=yiv502438905>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top><BR><BR>--- On <B>Wed, 5/18/11, Huihong Luo <I><huisinro@yahoo.com></I></B> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Huihong Luo <huisinro@yahoo.com><BR>Subject: Re: [vbox-dev] some suggestions to improve vhd disks<BR>To: "Howard Su" <howard0su@gmail.com><BR>Date: Wednesday, May 18, 2011, 11:03 PM<BR><BR>
<DIV id=yiv502438905>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>our code is highly tighed with windows kernel driver code, very hard to separate. Will try in the future. As you know, Windows IRP is very different beast, the VHD driver itself is more than 50,000 line of code, with lots of optimizations, close to real hd, as we measure vbooted Windows 7 (from VHD) versus booted from real hd.</DIV>
<DIV> </DIV>
<DIV>So I'd rather provide some general ideas, and vbox team can improve the implementations. Disk code in vbox is already very fast.<BR><BR>--- On <B>Wed, 5/18/11, Howard Su <I><howard0su@gmail.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Howard Su <howard0su@gmail.com><BR>Subject: Re: [vbox-dev] some suggestions to improve vhd disks<BR>To: "Huihong Luo" <huisinro@yahoo.com><BR>Date: Wednesday, May 18, 2011, 9:49 PM<BR><BR>
<DIV id=yiv502438905><BR><BR>
<DIV class=yiv502438905gmail_quote>On Thu, May 19, 2011 at 3:43 AM, Huihong Luo <SPAN dir=ltr><<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" target=_blank rel=nofollow>huisinro@yahoo.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=yiv502438905gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Compared to vdi/vmdk, vhd disk could be 2 x slower with current implementations. For example, when I dump a 250G disk to a vhd, it taks almost 2 x time to complete compared to vmdk.</DIV>
<DIV> </DIV>
<DIV>The following are some suggestions that could improve the performance, as we have implemented them in our kernel vboot driver for vhd (we didn't use any vhd code from vbox for vhd disk).</DIV>
<DIV> </DIV>
<DIV>(1) allocated a bitmap to keep tracking of all blocks, if a block has a sector bitmap of all 1s, then market it inside this block bitmap. This way, no need to read the sector bitmap for a block with all sectors allocated.</DIV>
<DIV> </DIV>
<DIV>(2) caching sector bitmaps. We cache 256 sector bitmaps, this saves the time to read and update sector bitmaps.</DIV></TD></TR></TBODY></TABLE></BLOCKQUOTE>
<DIV>Interesting ideas. Can you show you diff? </DIV>
<BLOCKQUOTE class=yiv502438905gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV> </DIV>
<DIV>These 2 can gain quite some performance, close to vmdk/vdi, at least.</DIV>
<DIV> </DIV><FONT color=#888888>
<DIV>- huihong</DIV></FONT></TD></TR></TBODY></TABLE><BR>_______________________________________________<BR>vbox-dev mailing list<BR><A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" target=_blank rel=nofollow>vbox-dev@virtualbox.org</A><BR><A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank rel=nofollow>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR><BR></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- <BR>-Howard<BR></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE></DIV><BR>-----Inline Attachment Follows-----<BR><BR>
<DIV class=plainMail>_______________________________________________<BR>vbox-dev mailing list<BR><A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A><BR><A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR></DIV></BLOCKQUOTE></td></tr></table>