Asias He 246c834771 kvm tools: Implement virtio net TSO/UFO support
This patch bumps host to guest tcp bandwidth from

1060 Mib/s to 1760 Mib/s,

and guest to host tcp bandwidth from

 342 Mib/s to  619 Mib/s.

*************************
Without TSO and UFO
*************************
(guest <- host)
root@sid1:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.33.15 port 5001 connected with 192.168.33.2 port 38733
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.23 GBytes  1.06 Gbits/sec
^Croot@sid1:~# iperf -s -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:   110 KByte (default)
------------------------------------------------------------
[  3] local 192.168.33.15 port 5001 connected with 192.168.33.2 port 54933
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec  0.030 ms    0/  893 (0%)

(guest to host)
root@sid1:~# iperf -c host
------------------------------------------------------------
Client connecting to host, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.33.15 port 42197 connected with 192.168.33.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec    408 MBytes    342 Mbits/sec
root@sid1:~# iperf -c host -u
------------------------------------------------------------
Client connecting to host, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:   110 KByte (default)
------------------------------------------------------------
[  3] local 192.168.33.15 port 56176 connected with 192.168.33.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec
[  3] Sent 893 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec  0.012 ms    0/  893 (0%)

*************************
With TSO and UFO
*************************

(guest <- host)
root@sid1:~# iperf  -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.33.15 port 5001 connected with 192.168.33.2 port 42767
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  2.05 GBytes  1.76 Gbits/sec
root@sid1:~# iperf  -s -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:   110 KByte (default)
------------------------------------------------------------
[  3] local 192.168.33.15 port 5001 connected with 192.168.33.2 port 35049
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec  0.031 ms    0/  893 (0%)

(guest -> host)
asias@hj:~$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.33.2 port 5001 connected with 192.168.33.15 port 60868
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec   738 MBytes   619 Mbits/sec
asias@hj:~$ iperf -s -u
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size:  112 KByte (default)
------------------------------------------------------------
[  3] local 192.168.33.2 port 5001 connected with 192.168.33.15 port 40602
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec   0.030 ms    0/  893 (0%)

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:42 +01:00
2015-06-01 16:39:39 +01:00
2015-06-01 16:39:42 +01:00
2015-06-01 16:39:42 +01:00
2015-06-01 16:39:41 +01:00

Native Linux KVM tool
=====================
The goal of this tool is to provide a clean, from-scratch, lightweight
KVM host tool implementation that can boot Linux guest images (just a
hobby, won't be big and professional like QEMU) with no BIOS
dependencies and with only the minimal amount of legacy device
emulation.

Note that this is a development prototype for the time being: there's no
networking support and no graphics support, amongst other missing
essentials.

It's great as a learning tool if you want to get your feet wet in
virtualization land: it's only 5 KLOC of clean C code that can already
boot a guest Linux image.

Right now it can boot a Linux image and provide you output via a serial
console, over the host terminal, i.e. you can use it to boot a guest
Linux image in a terminal or over ssh and log into the guest without
much guest or host side setup work needed.

1. To try out the tool, clone the git repository:

  git clone git://github.com/penberg/linux-kvm.git

or alternatively, if you already have a kernel source tree:

  git checkout -b kvm/tool
  git pull git://github.com/penberg/linux-kvm.git

2. Compile the tool:

  cd tools/kvm && make

3. Download a raw userspace image:

  wget http://wiki.qemu.org/download/linux-0.2.img.bz2 && bunzip2
linux-0.2.img.bz2

4. Build a kernel with CONFIG_VIRTIO_BLK=y and
CONFIG_SERIAL_8250_CONSOLE=y configuration options. Note: also make sure
you have CONFIG_EXT2_FS or CONFIG_EXT4_FS if you use the above image.

5. And finally, launch the hypervisor:

  ./kvm --image=linux-0.2.img --kernel=../../arch/x86/boot/bzImage

The tool has been written by Pekka Enberg, Cyrill Gorcunov, and Asias
He. Special thanks to Avi Kivity for his help on KVM internals and Ingo
Molnar for all-around support and encouragement!

See the following thread for original discussion for motivation of this
project:

http://thread.gmane.org/gmane.linux.kernel/962051/focus=962620

Build dependencies
=====================
For deb based systems:
32-bit:
sudo apt-get install build-essential
64-bit:
sudo apt-get install build-essential libc6-dev-i386

For rpm based systems:
32-bit:
yum install glibc-devel
64-bit:
yum install glibc-devel glibc-devel.i386
S
Description
No description provided
Readme 2.1 MiB
Languages
C 96.6%
Makefile 2.6%
Assembly 0.5%
Shell 0.3%