From b2e1907c3aed8ba2620b25a8d9a976901ea05aed Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 25 Aug 2016 03:55:28 -0700 Subject: [PATCH] Increase link delay to 2ms for more robust effect With a 1 ms delay, the performance tests periodically fails under nested virtualization, which is how we are testing it. Increasing the delay should make the effect (lower TCP data rates as latency increases, due to TCP's congestion control algorithm) more pronounced and robust. --- examples/linearbandwidth.py | 13 +++++++------ examples/test/test_linearbandwidth.py | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/examples/linearbandwidth.py b/examples/linearbandwidth.py index 802f6d1..1dd7ab1 100755 --- a/examples/linearbandwidth.py +++ b/examples/linearbandwidth.py @@ -87,7 +87,7 @@ def linearBandwidthTest( lengths ): info( "*** testing", datapath, "datapath\n" ) Switch = switches[ datapath ] results[ datapath ] = [] - link = partial( TCLink, delay='1ms' ) + link = partial( TCLink, delay='2ms' ) net = Mininet( topo=topo, switch=Switch, controller=Controller, waitConnected=True, link=link ) @@ -102,19 +102,20 @@ def linearBandwidthTest( lengths ): # since the reference controller is reactive src.cmd( 'telnet', dst.IP(), '5001' ) info( "testing", src.name, "<->", dst.name, '\n' ) - bandwidth = net.iperf( [ src, dst ], seconds=10 ) - info( bandwidth, '\n' ) + # serverbw = received; _clientbw = buffered + serverbw, _clientbw = net.iperf( [ src, dst ], seconds=10 ) + info( serverbw, '\n' ) flush() - results[ datapath ] += [ ( n, bandwidth ) ] + results[ datapath ] += [ ( n, serverbw ) ] net.stop() for datapath in switches.keys(): info( "\n*** Linear network results for", datapath, "datapath:\n" ) result = results[ datapath ] info( "SwitchCount\tiperf Results\n" ) - for switchCount, bandwidth in result: + for switchCount, serverbw in result: info( switchCount, '\t\t' ) - info( bandwidth[ 0 ], 'server, ', bandwidth[ 1 ], 'client\n' ) + info( serverbw, '\n' ) info( '\n') info( '\n' ) diff --git a/examples/test/test_linearbandwidth.py b/examples/test/test_linearbandwidth.py index d93ce0b..a18d97a 100755 --- a/examples/test/test_linearbandwidth.py +++ b/examples/test/test_linearbandwidth.py @@ -34,8 +34,8 @@ class testLinearBandwidth( unittest.TestCase ): bw *= 10 ** 9 # check that we have a previous result to compare to if n != 1: - info = ( 'bw: %d bits/s across %d switches, ' - 'previous: %d bits/s across %d switches' % + info = ( 'bw: %.2e bits/s across %d switches, ' + 'previous: %.2e bits/s across %d switches' % ( bw, n, previous_bw, previous_n ) ) self.assertTrue( bw < previous_bw, info ) previous_bw, previous_n = bw, n