aboutsummaryrefslogtreecommitdiffstats
path: root/vhost-test/README.md
blob: ee5f56ff8aaa386058f2cb8fd37fd6300aa1875f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Vhost and VPP testing script

This script intends to provide a reference script for testing [VPP](http://fd.io/) vhost-user performances.
It uses the basic topology PHY -> VM -> PHY.
You will therefore need a machine with two physical interfaces and the ability to run a VM with qemu in
order to run the test.

## A word about the VM

The VM that is executed is a CLONE of the running system.
In practice, that means that the VM is using, as root filesystem,
a mounted OverlayFS instance of the root directory (Meaning that
the VM will share the same file, but all updates will not affect the
root file system).

This also means that the VM boots on a shared file system, which implies
that the initramfs image must include the 9p driver.

One way of doing it is documented [here] (http://unix.stackexchange.com/questions/90423/can-virtfs-9p-be-used-as-root-file-system).
$ printf '%s\n' 9p 9pnet 9pnet_virtio | sudo tee -a /etc/initramfs-tools/modules
$ sudo update-initramfs -u


## HowTo

$ cd vhost-test

First copy and update the configuration file such that the parameters
correspond to your setup.

$ cp conf.sh.default conf.sh
$ vim conf.sh

Then, run the setup.

$ ./vhost.sh start

Once the setup is running, you can re-pin the processes.
This is important, as it also performs 'chrt' on the working threads.

$ ./vhost.sh pin

Once the setup is running, you can:
- Log into the VM
$ ./vhost.sh ssh

- Log into VPP
$ sudo screen -r vhtestvpp


Finally, when you are done, you can stop the VMs.

$ ./vhost.sh stop

## Traffic Generation

Traffic generation is, for now, out of the scope of this script.
You are supposed to update ./conf.sh by setting up the right parameters.
Use the traffic generator you like to test the perfs.

## Administrativa

### Current status

This script hasn't been tested by anyone but me for now.
You should therefore expect bugs on different setups.

### Main contributors

Pierre Pfister - LF-ID:ppfister