iperf tool on MirageOS
This program is a network performance measurement tool on MirageOS based on the test iperf implementation included in mirage-tcpip (https://github.com/mirage/mirage-tcpip). You can measure the TCP throughput between two different MirageOS VMs by this tool.
- MirageOS
- Hypervisor software(Xen or QEMU/KVM)
- Libvirt with virsh(https://libvirt.org/) and jq (https://stedolan.github.io/jq/)
(if you conduct an automated measurement framework provided byiperf_run.sh
oriperf_hvm_run.sh
)
- Check your target path.
TCP client iniperf_client
, TCP server iniperf_server
UDP client iniperf_udp_client
, UDP server iniperf_udp_server
- Edit the following variables in unikernel.ml of your target client program.
server_ip
(= server IP address)total_size
(= total data size to be sent)blen
(= sender buffer size)
- Configure your target programs. You must assign an IP address for each side in this step.
(client side using hvt)
$ mirage configure --ipv4=192.168.122.11/24 -t hvt
(server side using hvt)
$ mirage configure --ipv4=192.168.122.10/24 -t hvt
- Compile your target programs.
- Launch the server side at first, then the client side.
- Xen or QEMU/KVM
- Modify domain xml files in ./template/ so that they can use a network bridge on your environment. The default bridge is
vmbr0
. - Modify parameters in
iperf_run.sh
so that it can be used on your environment.
CLIENTADDR
: A host IP for libvirt where you want to run a client side VMSERVERADDR
: A host IP for libvirt where you want to run a server side VM
USER
: A username you want to use
OCAMLVER
: An OCaml compiler version you want to useBUFSIZE
: Sender buffer size
ITERATIONS
: # of measurements for each sender buffer size - Execute
./iperf_run xen tcp /path/to/dir
if you want to launch the TCP client and server side programs at/path/to/dir
on Xen-based physical servers.
1st argument :xen
orvirtio
2nd argument :tcp
orudp
3rd argument :/path/to/dir
(where you want to put the server and client kernel files)
- Modify domain xml files in ./template/ so that they can use a network bridge on your environment. The default bridge is
- hvt
- Create and configure two tap devices on your hosts and check if they can communicate each other.
- Modify parameters in
iperf_hvt_run.sh
. The default tap devices aretap0
andtap1
for the server and client respectively. - Execute
./iperf_hvt_run.sh tcp
if you want to launch the TCP client and server side programs.
1st argument :tcp
orudp
- UDP-based programs are partly compatible with the C-based iperf. This is just for testing. (The programs were tested with iperf-2.0.9)
- C-based client with MirageOS-based server
Note that you can check only the bytes transferred and bit rate. The jitter and packet loss rate fields (= indicated as "Server report:" in the client side output) are invalid as the server side does not measure them. - MirageOS-side client with C-based client
No special considerations needed.
- C-based client with MirageOS-based server