Kernel-based online monitoring of VNF packet processing times
KOMon is a tool developed to characterize and monitor the packet processing times of softwareized network functions by performing in-stack monitoring. In-stack monitoring leverages the network stack of the platform it is deployed on to monitor packets with high accuracy and low overhead.
This repository contains the codebase of KOMon itself, the dummy network function used during development and evaluation of the tool as well as the measurement data obtained during the evaluation process.
The repository is structured as follows.
/KOMon/ contains the Kernel patch required to build and load the KOMon Kernel module.
/KOMon/src/ contains the source code of the Kernel module itself.
/example_vnf/ contains the codebase of the example VNF used during the evaluation, Makefile included.
/scripts/ contains the user space scripts to control the measurement, trigger monitoring intervals and so on.
/data/ contains the measurement data our evaluation is based on. Thereby files named
KERNEL_* contain values obtained using the KOMon tool, files named
VNF_* contain values reported by the VNF and are seen as the groundtruth. Finally, files named
BUFFER_* contain the fill level of the socket buffer at each monitoring point.
Installation of KOMon
The KOMon monitoring tool requires a modified version of Linux Kernel 4.11. The patch that needs to be applied to the mainline Kernel is included in the
/KOMon/ folder in this repository. After the patched Kernel is installed, the Kernel module can be loaded just like any other loadable module.
cd ./KOMon make sudo insmod udp_probe.ko debug=0 port=1234
Available parameters during load time are
debugto set the debug level. Note that most debug information is commented out in the code by default to minimize clock cycles spend in the monitoring logic. If debugging or working with the code, consider removing the commends, thereby activating the debug output code.
cbsizeto set the maximum sample size
portto define the port for packet filtering. Thereby, the port defines the port used by the VNF to receive packets and sends packet to. Meaning incoming and outgoing packets need to have the specified destination port.
The module can be unloaded via
sudo rmmod udp_probe.
Usage of KOMon
In order to use the scripts provided in the
/scripts/ folder, the module needs to be loaded and the example VNF needs to be compiled and its binary be placed inside the
/example_vnf/ folder. Otherwise, the scripts might need slight modifications.
Afterwards, a monitoring process can be initiated using
run_test_all.sh with its first parameter being the path to a parameter file. The script will then execute all tests defined in the parameter file, creating three result files (
BUFFER_*) for each parameter combination.
A single parameter combination can be executed using the
run_test.sh script with the parameters following in the same order as provided in the parameter file.
An example parameter file can be found in
/scripts/params/ and has the following format
1000 1 0.1 1000 128 0 0 1000 1 0.1 1000 128 100 0 1000 1 0.1 1000 128 200 0 1000 1 0.1 1000 128 300 0 1000 1 0.1 1000 128 400 0 1000 1 0.1 1000 128 500 0
Thereby, the order of parameters is
- Number of monitoring intervals
- Number of packets to sample per interval
- Sleep between intervals
- Current load in packets per second
- Packet size in byte
- Artificial delay to induce by the example VNF
- Distribution of processing times (0: Constant, 1: Negative exponential, 2: Uniform, 3: Normal (c=1), 4: Normal (c=0.2))
Usage of KOMon without included scripts
In order to interface with the KOMon Kernel module, it exposes an interface via procfs:
The user is then able to issue commands be echoing values into the interface file. Available commands are as follows.
startstarts a new monitoring interval which samples the specified number of packets
stopinterrupts the current interval, discarding all already sampled data
reset_packetsclears the ring buffer used to store packets currently in the system. This should not be required unless for debugging purposes.
reset_procclears the ring buffer used to store calculated processing times. Also only for debugging purposes.
<int>- Echoing a valid integer of up to
cbsizeconfigures the samplesize and thereby the packets monitored in each interval
-1resets the samplesize so that
samplesize = cbsize
For any questions regarding the code please contact Stefan Geissler
This repository contains the sources used for the work published in
Stefan Geissler, Stanislav Lange, Florian Wamser, Thomas Zinner, Tobias Hoßfeld, “KOMon - Kernel-based Online Monitoring of VNF Packet Processing Times” in Proceedings of the Conference on Networked Systems (NetSys), Munich, Germany, 2019.