Cbench (New)
Cbench
Cbench (controller benchmarker) is a program for testing OpenFlow controllers by generating packet-in events for new flows. Cbench emulates a bunch of switches which connect to a controller, send packet-in messages, and watch for flow-mods to get pushed down. If you think a change you are making may have a performance impact, it can be helpful to use cbench to measure it.
Installing cbench
Please refer to http://www.openflow.org/wk/images/3/3e/Manual.pdf Chapter 2 for detailed installation instructions.
Under debian/ubuntu Linux:
$ sudo apt-get install autoconf automake libtool libsnmp-dev libpcap-dev $ git clone git://gitosis.stanford.edu/oflops.git $ cd oflops; git submodule init && git submodule update $ git clone git://gitosis.stanford.edu/openflow.git $ cd openflow; git checkout -b release/1.0.0 remotes/origin/release/1.0.0 $ wget http://hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz $ tar -xvzf libconfig-1.4.9.tar.gz $ cd libconfig-1.4.9 $ ./configure $ sudo make && sudo make install $ cd ../../netfpga-packet-generator-c-library/ $ sudo ./autogen.sh && sudo ./configure && sudo make $ cd .. $ sh ./boot.sh ; ./configure --with-openflow-src-dir=<absolute path to openflow branch>; make $ sudo make install $ cd cbench
You should now be able to run cbench.
Running cbench
Cbench has a number of arguments. The interesting ones for us are:
M |
number of MACs / hosts to emulate per switch |
s |
number of switches to emulate |
t |
throughput (vs. latency mode) |
A useful example:
./cbench -c localhost -p 6633 -m 10000 -l 10 -s 16 -M 1000 -t