diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-03-01 11:02:25 +0100 |
|---|---|---|
| committer | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-03-07 11:29:02 +0100 |
| commit | 6cbcfb039e608419bd6ced673723918aca6fb278 (patch) | |
| tree | 172061d95f50cda09c3872d32c5f77e459044cd8 /examples/congestion.py | |
| parent | 4e35c6b445d0cfbad9cf15a48f2d341e29dbd806 (diff) | |
| download | rumba-6cbcfb039e608419bd6ced673723918aca6fb278.tar.gz rumba-6cbcfb039e608419bd6ced673723918aca6fb278.zip | |
rumba: Remove irati/rlite, python2 and qemu support
Remove IRATI and rlite prototype plugins, keeping only Ouroboros.
Delete .gitlab-ci.yml (only contained an irati test job and a
Sphinx pages job). Clean up all irati/rlite imports and references
from examples, documentation, and tools.
Qemu was tied heavily with rlite and irati. As it's less useful for
ouroboros it's removed rather than reworked.
Updated README.md and AUTHORS
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Diffstat (limited to 'examples/congestion.py')
| -rwxr-xr-x | examples/congestion.py | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/examples/congestion.py b/examples/congestion.py new file mode 100755 index 0000000..844f136 --- /dev/null +++ b/examples/congestion.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python + +# An example script using the rumba package + +from rumba.model import Node, UnicastLayer, EthDixLayer +from rumba.storyboard import * +from rumba.utils import ExperimentManager, PROMPT_SWAPOUT +from rumba.topologies import build_star + +# import testbed plugins +import rumba.testbeds.jfed as jfed + +# import Ouroboros prototype plugin +import rumba.prototypes.ouroboros as our + +import rumba.log as log + + +__all__ = ["exp", "sb", "nodes", "main", "run"] + +log.set_logging_level('DEBUG') + +n1 = UnicastLayer("n1") + +leaves, routerNode = build_star( + ["client1", "client2", "server"], n1, hub_name="router") +clientNode1, clientNode2, serverNode = leaves + +nodes = ["client1", "client2", "router", "server"] + +tb = jfed.Testbed(exp_name='cc2', + cert_file='/path/to/cert.pem', + authority='wall1.ilabt.iminds.be', + image='UBUNTU18-64-STD', + username='username', + exp_hours='1', + proj_name='ouroborosrocks') + +exp = our.Experiment(tb, + nodes=[clientNode1, clientNode2, routerNode, serverNode], + # git_repo='https://codeberg.org/o7s/ouroboros', + git_branch='be', + build_options='-DCMAKE_BUILD_TYPE=Debug ' + '-DSHM_BUFFER_SIZE=131072 ' + '-DIPCP_ETH_PAD_RUNT_FRAMES=false ' + '-DDISABLE_CORE_LOCK=false ' + '-DPCP_SCHED_THR_MUL=1', + add_packages=['ethtool'], + influxdb={ + 'ip': '127.0.0.1', + 'port': 8086, + 'org': "Ouroboros", + 'token': "your-influxdb-token" + }) + +sb = StoryBoard(experiment=exp, duration=1500, servers=[]) + + +def run(): + sb.run_command("server", + 'irm bind prog ocbr name ocbr_server;' + 'irm name register ocbr_server layer n1;' + 'ocbr --listen > /dev/null 2>&1 &') + sb.run_command("client1", + 'irm bind prog ocbr name ocbr_client1;' + 'irm name register ocbr_client1 layer n1;' + 'ocbr --listen > /dev/null 2>&1 &') + sb.run_command("server", + 'irm bind prog oping name oping_server;' + 'irm name register oping_server layer n1;' + 'oping --listen > /dev/null 2>&1 &') + sb.run_command("client1", "for sz in `seq 0 10 200 1000`;" + "do oping -n oping_server -i 0ms -s $sz -d 120;" + "done") + sb.run_command("client1", "ocbr -n ocbr_server -r 70M -d 600 --spin > /dev/null 2>&1 &") + sb.run_command("server", "ocbr -n ocbr_client1 -r 70M -d 600 --spin > /dev/null 2>&1 &") + time.sleep(30) + sb.run_command("client2", "ocbr -n ocbr_server -r 70M -d 30 --spin > /dev/null 2>&1 &") + time.sleep(45) + sb.run_command("client2", "ocbr -n ocbr_server -r 20M -d 30 --spin > /dev/null 2>&1 &") + time.sleep(45) + sb.run_command("client2", "ocbr -n ocbr_server -r 60M -d 30 -s 1400 --spin > /dev/null 2>&1 &") + time.sleep(45) + sb.run_command("client2", "ocbr -n ocbr_server -r 60M -d 30 -s 1200 --spin > /dev/null 2>&1 &") + time.sleep(45) + sb.run_command("client2", "ocbr -n ocbr_server -r 60M -d 30 -s 1000 --spin > /dev/null 2>&1 &") + time.sleep(45) + sb.run_command("client2", "ocbr -n ocbr_server -r 60M -d 30 -s 800 --spin > /dev/null 2>&1 &") + time.sleep(35) + sb.run_command("client2", "ocbr -n ocbr_server -r 60M -d 30 -s 500 --spin > /dev/null 2>&1 &") + time.sleep(35) + sb.run_command("client2", "ocbr -n ocbr_server -r 60M -d 30 -s 200 --spin > /dev/null 2>&1 &") + time.sleep(200) +# sb.ouroboros_stop_metrics_exporter(nodes) +# exp.terminate_prototype() + + +def main(): + with ExperimentManager(exp, swap_out_strategy=PROMPT_SWAPOUT): + exp.swap_in() + exp.install_prototype() + exp.set_phy_link_rate_between("router", "server", 100) + exp.start_metrics_exporter(nodes, interval=300) + exp.bootstrap_prototype() + run() + + +if __name__ == "__main__": + main() |
