I am running a 32-bit Linux virtual machine on KVM. The host machine is a 64-bit Linux machine connected to a LAN. Attempting to transfer files with scp from the KVM machine to a server on the LAN gives abysmal performance, about 500kB/s over gigabit Ethernet. Around 1% of the expected rate. Any suggestions?
Consider using virtio. It allows a direct connection between the VM and the host without the need to emulate (slow) hardware. I measured high network performance improvements with it.
For example, you can enable the virtio network device by the kvm command line parameter "-net nic,model=virtio".
If you are using the virtio block devices, please note that the new device names are then "vda1" etc., but this should be not a problem since current Linux distributions detect the partitions according to their UUIDs.
It might be a problem of the Disk I/O performance inside the guest. If you are using a disk image, few steps apply to have better performance :
Firs, you will have to play around with the
Then, you will also have to play around with elevator option of the kernel : you will have to append
A better explaination of this is available at : http://lonesysadmin.net/2008/02/21/elevatornoop/ ; but in a few words, the host linux kernel and the guest linux kernel both try to optimize I/O and it tends to be worse than anything for the guest (the guest should leave this task to the host).