[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-users] copying or dding from a VM-template resulting in the whole system getting stuck



On Fri, 2010-10-15 at 10:06 -0400, Jeff Sturm wrote:

> 
> 
> With the âddâ command, try âiflag=directâ and âoflag=directâ.  Use a
> reasonable buffer size, like bs=64k or so, to achieve a faster copy
> operation.
> 
It looks like this may depend on the particulars of the storage devices
you have. For me, direct I/O was much slower, even much slower than
using "cp". But using dd with a 64k buffer size was a huge speedup over
"cp", thanks for the tip on that. The difference is marked enough that
it will probably be worth modifying my cloning script to copy this way
rather than straight cp.

This is using 5GB images, a hardware raid device running RAID-5 with
SCSI disks, and a DRBD-replicated file system:

root@vmi1 vmgroup1]# time cp paraivm.img test.img

real    0m46.174s
user    0m1.324s
sys     0m21.913s

[root@vmi1 vmgroup1]# time dd if=paraivm.img of=test.img bs=64k
80000+0 records in
80000+0 records out
5242880000 bytes (5.2 GB) copied, 8.6259 seconds, 608 MB/s

real    0m8.646s
user    0m0.076s
sys     0m8.505s

[root@vmi1 vmgroup1]# time dd if=paraivm.img of=test.img bs=64k
iflag=direct oflag=direct
80000+0 records in
80000+0 records out
5242880000 bytes (5.2 GB) copied, 109.316 seconds, 48.0 MB/s

real    1m49.319s
user    0m0.012s
sys     0m12.209s


--Greg




_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.