On Sun, Aug 22, 2010 at 07:28:50PM +0300, Avi Kivity wrote: > On 08/01/2010 11:41 PM, Richard W.M. Jones wrote: > >On Wed, Jul 28, 2010 at 07:39:30PM +0200, Sven Lankes wrote: > >>You might want to add -c to the ssh cmd to compress the data if the > >>connection between the servers is< 100 MBit/s. > >When writing the original virt-p2v we found the -C option actually > >makes things a lot slower, assuming the common case where you have a > >gigabit network between the servers. It's quicker just to copy > >without the overhead of compression. > > Interesting, I'd have guessed that encryption will dominate the cpu > cost, and that compression would be a win since there's less to > encrypt and transmit.
Maybe my explanation is wrong too. virt-p2v was definitely much slower when we added the '-C' option. However read on. I just ran a test again on my local LAN. This is between two approximately equal Fedora machines, over a moderate quality consumer gigabit ethernet switch. The command approximates what virt-p2v does: sending 1MB blocks from local /dev device, and at the target end using cat to write to a file. $ time sh -c 'dd bs=1M if=/dev/vg_trick/Windows7x64 | ssh amd "cat > /tmp/copy1"' 16384+0 records in 16384+0 records out 17179869184 bytes (17 GB) copied, 1473.26 s, 11.7 MB/s real 24m33.269s user 4m16.944s sys 4m43.181s $ time sh -c 'dd bs=1M if=/dev/vg_trick/Windows7x64 | ssh -C amd "cat > /tmp/copy2"' 16384+0 records in 16384+0 records out 17179869184 bytes (17 GB) copied, 1412.7 s, 12.2 MB/s real 23m32.736s user 17m52.739s sys 5m0.884s In summary: Copy rate (no compression): 11.7 MB/s Copy rate (with compression): 12.2 MB/s So now compression is (slightly) faster. YMMV. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html _______________________________________________ virt mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/virt
