Bufferbloat example does not work on Ubuntu 18.04 and above
See original GitHub issueExpected/Desired Behavior:
Bufferbloat lab exercise (https://github.com/mininet/mininet/wiki/Bufferbloat) should work with the current mininet 2.3.0 VM images based on Ubuntu 18.04 and 20.04.
Actual Behavior:
Tracing of TCP congestion window cwnd fails, because kernel module tcp_probe is not present on Ubuntu 20.04 (the module is present on 18.04, but cannot be loaded due to missing kernel functions). Additionally, on 20.04 it is necessary to first modify the python scripts to work with python 3 (falling back to python 2 is possible, but requires installing matplotlib for python 2 with pip, because it is no longer available as a package.)
Detailed Steps to Reproduce the Behavior:
Launch monitor.sh
as per Part 4 of the example. This executes exp_monitor.py
, which will fail to launch TCP tracing with modprobe tcp_probe
. The scripts seem to run, but the trace file and the figures generated with plot_tcpprobe.py
will be empty.
Additional Information:
The Bufferbloat example works on the current mininet 2.3.0 VM image based on Ubuntu 16.04 (tested with mininet-2.3.0-210211-ubuntu-16.04.7-server-amd64-ovf.zip).
Since tcp_probe has been removed from the kernel, several sources suggest using ftrace instead. This implies modifying plot_tcpprobe.py
to match the new trace file format. However, this fails as well, since mininet network events are not logged by the ftrace mechanism, even after mounting /sys/kern/debug
. This changed tracing behavior has been observed by others, see https://stackoverflow.com/questions/65868476/how-to-use-ftrace-for-tcp-probe.
I suggest adding a remark to the Bufferbloat exercise, stating that in order to work “out of the box,” it requires python 2 and a kernel with working tcp_probe module. The simplest way to achieve this is to use the provided Ubuntu 16.04 VM images (without upgrading the kernel).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
@janev94 Got it. I have added an explicit reference link to your GitHub Gist in my previous comment.
Just to be clear, the code in my comment was less intended to be a full solution and more for aiding discussion, since said implementation did not work.
I will leave the discussion of fixing the bufferbloat example between you and the maintainers of mininet then.
@jamestiotio @lantz Hi, I see that my stackoverflow answer has made it here… and so did my verbose reno code (without proper acknowledgments). I do believe that this is the “correct” long-term solution as it would require change in the kernel TCP API in order for it to break. That said, James has only borrowed my New Reno code and not the others for Cubic, etc. I do believe that a series of sysctl handles and better information exposure would make it easier for kernel parsing. Additionally, a makefile and instructions how to load the custom modules is also needed and is lacking from the previous answer.
For future reference, please note that all this code was copyrighted under GPLv2 and I endorse redistribution as long as the correct headers and acknowledgements are given. I would also be happy to provide working kernel modules for whichever algorithms it is that you want to measure bufferbloat with instructions if that is the way you would like to proceed.