Benchmarking Configuration

Today, the most common tool for measuring controller performance is cbench. We've made some changes to Floodlight to enhance cbench performance and want to suggest a configuration for running performance tests of this type.

Get a fast JVM

OpenJDK is easy to install but its worth getting a fast Sun JVM to maximize performance. Check out www.java.com.

Update the floodlight properties file

Edit src/main/resources/floodlightdefault.properties to look like this. It loads a minimal, optimized configuration of Floodlight.

floodlight.modules=\
net.floodlightcontroller.storage.memory.MemoryStorageSource,\
net.floodlightcontroller.core.internal.FloodlightProvider,\
net.floodlightcontroller.threadpool.ThreadPool,\
net.floodlightcontroller.debugevent.DebugEventService,\
net.floodlightcontroller.debugcounter.DebugCounterServiceImpl,\
net.floodlightcontroller.perfmon.PktInProcessingTime,\
net.floodlightcontroller.debugevent.DebugEventService,\
net.floodlightcontroller.restserver.RestApiServer,\
net.floodlightcontroller.hub.Hub

Note that you can substitute net.floodlightcontroller.learningswitch.LearningSwitch in place of Hub. This will slightly increase the overhead of Floodlight at the benefit of providing more intelligent packet forwarding decisions. (Hub simply floods a packet-out for each packet-in, which LearningSwitch tries to learn host locations and install flows.)

Build Floodlight

The Floodlight properties file is cached in the Floodlight jar. You can either rebuild Floodlight or add a "-cf floodlightdefault.properties" to the java command in floodlight.sh (in the root floodlight directory)

$ ant

Run Floodlight

You should use floodlight.sh in the root directory to run Floodlight. This includes a number of Java properties that optimize performance.

Caveats

Depending on the number of MAC's in your test, you may need to tweak memory properties further.