NameDateSize

..13-Mar-2018195

.gitignoreH A D13-Mar-201819

conf.sh.defaultH A D13-Mar-20181.8 KiB

mg.luaH A D13-Mar-20185.5 KiB

README.mdH A D13-Mar-20182.7 KiB

vhost.shH A D13-Mar-201818.1 KiB

README.md

1# Vhost and VPP testing script
2
3This script intends to provide a reference script for testing [VPP](http://fd.io/) vhost-user performances.
4It uses the basic topology PHY -> VM -> PHY.
5You will therefore need a machine with two physical interfaces and the ability to run a VM with qemu in
6order to run the test.
7
8## A word about the VM
9
10The VM that is executed is a CLONE of the running system.
11In practice, that means that the VM is using, as root filesystem,
12a mounted OverlayFS instance of the root directory (Meaning that
13the VM will share the same file, but all updates will not affect the
14root file system).
15
16This also means that the VM boots on a shared file system, which implies
17that the initramfs image must include the 9p driver.
18
19One way of doing it is documented [here] (http://unix.stackexchange.com/questions/90423/can-virtfs-9p-be-used-as-root-file-system).
20$ printf '%s\n' 9p 9pnet 9pnet_virtio | sudo tee -a /etc/initramfs-tools/modules
21$ sudo update-initramfs -u
22
23
24## HowTo
25
26$ cd vhost-test
27
28First copy and update the configuration file such that the parameters
29correspond to your setup.
30
31$ cp conf.sh.default conf.sh
32$ vim conf.sh
33
34Then, run the setup.
35
36$ ./vhost.sh start
37
38Once the setup is running, you can re-pin the processes.
39This is important, as it also performs 'chrt' on the working threads.
40
41$ ./vhost.sh pin
42
43Once the setup is running, you can:
44- Log into the VM
45$ ./vhost.sh ssh
46
47- Log into VPP
48$ sudo screen -r vhtestvpp
49
50
51Finally, when you are done, you can stop the VMs.
52
53$ ./vhost.sh stop
54
55## Traffic Generation with MoonGen
56
57mg.lua is intended to be used with the MoonGen packet generator.
58This script measures packet loss and forwarding with a user-defined
59granularity. The script keeps running while consecutive measures are
60too far on both Tx axis (--maxRateInterval option) or on the drop rate
61axis (--targetDropRateRatio). The latter is a ratio instead of an interval,
62as the packet drop is mostly a logarithmic value.
63
64The script is used as follows:
65sudo /path/to/MoonGen ./mg.lua <options>
66
67Mandatory options are:
68--rxport <id> MoonGen's rx port index
69--txport <id> MoonGen's tx port index
70--dst <hwaddr> Frame's destination L2 address
71
72Other options are:
73--duration <seconds> Each measurement duration
74--frameSize <bytes> Each frame size
75--maxRateInterval <%> Max Tx interval between measure
76--targetDropRateRatio <ratio> Max ratio between two drop rate measures
77--minRateInterval <%> Min Tx interval (Will override drop ratio in case of non-continuous)
78--out <file> Output file
79
80## Administrativa
81
82### Current status
83
84This script hasn't been tested by anyone but me for now.
85You should therefore expect bugs on different setups.
86
87### Main contributors
88
89Pierre Pfister - LF-ID:ppfister
90
91
92