<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>yes, it's on windows, but it may perform similar on Linux too.</DIV>
<DIV> </DIV>
<DIV>As Klaus pointed out in previous emails, it's more likely to do with the bitmap. Block size might be a factor too.</DIV>
<DIV> </DIV>
<DIV>If you examine vhdWrite(), it does the following:</DIV>
<DIV> </DIV>
<DIV>(1) read bitmap (1 sector)</DIV>
<DIV>(2) write block</DIV>
<DIV>(3) write footer</DIV>
<DIV>(4) write the bitmap</DIV>
<DIV> </DIV>
<DIV>this is 4 disk i/o, and especially, (3) - > (4) repositions the disk head back, very expensive</DIV>
<DIV> </DIV>
<DIV>Huihong<BR><BR>--- On <B>Mon, 10/19/09, Frank Mehnert <I><Frank.Mehnert@Sun.COM></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Frank Mehnert <Frank.Mehnert@Sun.COM><BR>Subject: Re: [vbox-dev] writing to VHD/VDI is 50% slower of VMDK?<BR>To: vbox-dev@virtualbox.org<BR>Date: Monday, October 19, 2009, 3:15 AM<BR><BR>
<DIV class=plainMail>On Tuesday 13 October 2009, Huihong Luo wrote:<BR>> This seems to be always the case, writing a large amount of data to vdi/vhd<BR>> is much much slower than writing to a vmdk disk. <BR>> I am using the the vboxddu.dll code, and clone physical disk to virtual<BR>> disk. <BR>> for example, clone 250G takes about 2.50 hrs to  a vmdk file,  whereas it<BR>> takes 4 hrs to a vdi file, under exact conditions, quite reproducible.<BR>> There is only writes to disks, no reads. <BR><BR>So this is a Windows host, correct? I can't imagine the reason for<BR>such a slowdown as there are not many differences between the backends.<BR>One differnece between .vmdk and .vdi is the block size. This needs<BR>further investigation.<BR><BR>Kind regards,<BR><BR>Frank<BR>-- <BR>Dr.-Ing. Frank Mehnert    Sun Microsystems, Inc.    www.sun.com<BR></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>