Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Makefile.am
README
cbench.c
cbench.h
fakeswitch.c
fakeswitch.h
myargs.c
myargs.h

README

cbench is a benchmarking tool for controllers

Algorithm:
    pretend to be n switches (n=16 is default)
    create n openflow sessions to the controller
    if latency mode (default):
        for each session:
            1) send up a packet in
            2) wait for a matching flow mod to come back
            3) repeat
            4) count how many times #1-3 happen per sec
    else in throughtput mode (i.e., with '-t'):
        for each session:
            while buffer not full:
                queue packet_in's
                count flow_mod's as they come back


NOTE: packet_in messages are the only (?) switch-solicited openflow
packet that should get a response from a controller.  Would be
nice to evaluate more, but this is at least something.


Quick start: run a controller on the local machine on port 6633, and 
launch cbench without arguments.

Longer start: change test params

---------------------------------------------------------------------
Sample output from simple controller in OpenFlow reference suite

[capveg@grr cbench]$ ./cbench -p 54321
cbench: controller benchmarking tool
    connecting to controller at localhost:54321
    faking 16 switches :: 16 tests each; 1000 ms per test
    starting test with 0 ms delay after features_reply
    debugging info is off
16  switches: fmods/sec:  4661  4656  4655  4651  4649  4647  4645  4643  4640  4636  4634  4631  4625  4621  4617  4608   total = 74.218852 per ms
16  switches: fmods/sec:  4843  4843  4842  4842  4842  4842  4842  4842  4841  4841  4841  4841  4841  4841  4839  4838   total = 77.458909 per ms
16  switches: fmods/sec:  4649  4647  4647  4646  4646  4646  4646  4646  4646  4643  4642  4642  4642  4641  4641  4640   total = 74.308588 per ms
16  switches: fmods/sec:  4832  4832  4832  4832  4832  4831  4831  4831  4831  4831  4831  4831  4830  4829  4829  4828   total = 77.292227 per ms
16  switches: fmods/sec:  4784  4784  4784  4784  4784  4784  4784  4784  4784  4784  4784  4783  4783  4783  4783  4782   total = 76.537923 per ms
16  switches: fmods/sec:  4705  4703  4701  4698  4694  4690  4688  4685  4682  4681  4679  4677  4670  4668  4665  4661   total = 74.945651 per ms
16  switches: fmods/sec:  4813  4810  4805  4803  4802  4799  4797  4794  4791  4790  4786  4782  4781  4774  4770  4763   total = 76.659157 per ms
16  switches: fmods/sec:  4817  4813  4808  4805  4801  4797  4796  4796  4791  4790  4785  4779  4777  4771  4769  4765   total = 76.659463 per ms
16  switches: fmods/sec:  4676  4674  4669  4667  4666  4662  4660  4657  4654  4651  4649  4644  4641  4638  4634  4624   total = 74.465777 per ms
16  switches: fmods/sec:  4880  4878  4875  4872  4870  4867  4865  4863  4860  4857  4853  4851  4844  4844  4843  4841   total = 77.762378 per ms
16  switches: fmods/sec:  4795  4795  4794  4793  4793  4793  4793  4793  4793  4793  4793  4792  4792  4791  4791  4790   total = 76.683003 per ms
16  switches: fmods/sec:  4868  4868  4868  4867  4867  4867  4866  4866  4865  4865  4865  4864  4864  4864  4864  4863   total = 77.850144 per ms
16  switches: fmods/sec:  4780  4781  4781  4781  4780  4779  4779  4779  4779  4779  4779  4778  4778  4778  4777  4776   total = 76.463082 per ms
16  switches: fmods/sec:  4844  4844  4844  4844  4844  4844  4843  4842  4842  4842  4842  4842  4841  4841  4841  4840   total = 77.479845 per ms
16  switches: fmods/sec:  4847  4847  4847  4847  4848  4848  4848  4848  4847  4847  4847  4847  4847  4846  4846  4846   total = 77.552845 per ms
16  switches: fmods/sec:  4788  4788  4788  4787  4787  4787  4787  4786  4786  4786  4785  4784  4784  4784  4784  4784   total = 76.574311 per ms
RESULT: 16 switches 16 tests min/max/avg/stdev = 74218.85/77850.14/76432.01/1214.77 responses/s

NOTE that depending on the switch, you might need to use the -D option to delay the test some 
amount after the OpenFlow handshake is complete so it finishes setting up it's internal state.
For example, the FlowVisor needs this so it can connect to the slice controller.

------------------------------------------------------------------------