Richard W.M. Jones
2012-Mar-07 14:21 UTC
[Libguestfs] copy file from host to live guest (speed)
On Wed, Mar 07, 2012 at 05:57:45AM -0800, THO HUYNH wrote:> I tried to copy file from host to the running guest after I had > mounted the guest but it`s seemed slow. The speed is about 6-8 > MB/s. I thought it would be the same with real hard drive (about > 20MB/s).Is this using 'guestmount --live'? Unfortunately FUSE is inefficient, particularly the way we implement it in guestmount. If you use 'guestfish --live' and the 'upload' command, you should be able to get full disk speed easily.> If I have more than one guest, will they share the 6-8 MB bandwidth ?If the guest storage is on different spindles, then you should be able to max out each spindle (using guestfish, not guestmount). If they all share the same disk spindle, then of course it will share the disk bandwidth.> Are there anyway to improve the performance ?Definitely use guestfish, or the libguestfs API directly. If you want to copy in large amounts of data, then *sometimes* it can be advantageous to prepare an ISO containing the data in advance: http://libguestfs.org/guestfs.3.html#uploading but you should measure it because it might not actually be faster, since uploads use virtio-serial which is very fast. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
thank you Mr Rich. I will try and give some feedbacks. :) ________________________________ From: Richard W.M. Jones <rjones at redhat.com> To: THO HUYNH <feeliwood at yahoo.com>; libguestfs at redhat.com Cc: libguestfs at redhat.com Sent: Wednesday, 7 March 2012, 21:21 Subject: Re: copy file from host to live guest (speed) On Wed, Mar 07, 2012 at 05:57:45AM -0800, THO HUYNH wrote:> I tried to copy file from host to the running guest after I had > mounted the guest but it`s seemed slow.? The speed is about 6-8 > MB/s. I thought it would be the same with real hard drive (about > 20MB/s).Is this using 'guestmount --live'? Unfortunately FUSE is inefficient, particularly the way we implement it in guestmount. If you use 'guestfish --live' and the 'upload' command, you should be able to get full disk speed easily.> If I have more than one guest, will they share the 6-8 MB bandwidth ?If the guest storage is on different spindles, then you should be able to max out each spindle (using guestfish, not guestmount).? If they all share the same disk spindle, then of course it will share the disk bandwidth.> Are there anyway to improve the performance ?Definitely use guestfish, or the libguestfs API directly. If you want to copy in large amounts of data, then *sometimes* it can be advantageous to prepare an ISO containing the data in advance: http://libguestfs.org/guestfs.3.html#uploading but you should measure it because it might not actually be faster, since uploads use virtio-serial which is very fast. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines.? Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20120307/7e744bef/attachment.htm>