The stress tests can be scaled to run without specialized equipment. For example, the recommended sampling rate for 10G links in production is 1-in-10,000. Driving a switch with 48x10G ports to 30% of total capacity would require a load generator capable of generating 288Gbit/s. However, dropping the sampling rate to 1-in-100 and generating a load of 2.88Gbit/s is an equivalent test of the sFlow agent's performance and can be achieved by two moderately powerful servers with 10G network adapters.
For example, using the test setup above, run an iperf server on Server2:
iperf -suThen run the following sequence of tests on Server1:
#!/bin/bash RT="10.0.0.162" TGT="server2" ping -f -c 100000 $TGT sleep 40 curl http://$RT:8008/app/sflow-test/scripts/test.js/load/json?bps=100000000 iperf -c $TGT -t 40 -u -b 100M curl http://$RT:8008/app/sflow-test/scripts/test.js/load/json?bps=0 sleep 40 curl http://$RT:8008/app/sflow-test/scripts/test.js/load/json?bps=200000000 iperf -c $TGT -t 40 -u -b 200M curl http://$RT:8008/app/sflow-test/scripts/test.js/load/json?bps=0 sleep 40 curl http://$RT:8008/app/sflow-test/scripts/test.js/load/json?bps=300000000 iperf -c $TGT -t 40 -u -b 300M curl http://$RT:8008/app/sflow-test/scripts/test.js/load/json?bps=0The results of the test are shown in the screen capture at the top of this article. The test pattern is based on the article Large flow detection and the sequence of steps in Load (show in gold) are accurately tracked by the Flows metric (shown in red). The Counters metric (shown in blue) doesn't accurately track the shape of the load and is delayed, but the peaks are consistent with Load and Flows values.
The table below the two strip charts shows that all the tests have passed:
- test duration The test must run for at least 5 minutes (300 seconds)
- check sequence numbers Checks that sequence numbers for datagrams and measurements are correctly reported and that measurements are delivered in order
- check data sources Checks that sampling rates and polling intervals are correctly configured and that data is being received
- sampled packet size Checks to make sure that sampled packet sizes are correctly reported
- random number generator Tests the hardware random number generator used for packet sampling
- compare byte flows and counters Checks that Bits per Second values (shown in the upper strip chart) are consistently reported by interface counters and by packet sampling
- compare packet flows and counters Checks that Packets per Second values (shown in the lower strip chart) are consistently reported by interface counters and by packet sampling.
- check ingress port information Verifies that ingress port information is included with packet samples
The project provide an opportunity for users and developers to collaborate on creating a set of tests that capture operational requirements and that can be used in product selection and development. An effective test application will help increase the quality of sFlow implementations and ensure that they address the need for measurement in SDN control applications.