reduce the range for reducing the tap traffic and increase the percentage of increament used

parent ef7cbf0d
...@@ -68,7 +68,7 @@ class dynamicRateLimiter(simple_switch_13.SimpleSwitch13): ...@@ -68,7 +68,7 @@ class dynamicRateLimiter(simple_switch_13.SimpleSwitch13):
self.logger.info('usedbw: %d', usedbw) self.logger.info('usedbw: %d', usedbw)
max_rate_limit = (bandwidth / 2) #max limit = 50% max_rate_limit = (bandwidth / 2) #max limit = 50%
increment = (bandwidth *(0.05)) # 5% increment [bandwidth is in KBps] increment = (bandwidth *(0.1)) # 10% increment [bandwidth is in KBps]
meterdbEntry= { meterdbEntry= {
'dpid':tap.get('dpid'), 'dpid':tap.get('dpid'),
...@@ -78,10 +78,7 @@ class dynamicRateLimiter(simple_switch_13.SimpleSwitch13): ...@@ -78,10 +78,7 @@ class dynamicRateLimiter(simple_switch_13.SimpleSwitch13):
'timeStamp':0 'timeStamp':0
}; };
if (90 <= usedbw <= 100): if (95 <= usedbw <= 100):
if (90 < usedbw <= 95):
self.logger.info("Optimal State Attained...")
return;
self.logger.info("Reduce the rate limiting rapidly by dividing it by 2") self.logger.info("Reduce the rate limiting rapidly by dividing it by 2")
new_limit = round(ratelimit/2 ) new_limit = round(ratelimit/2 )
new_limitKbps = new_limit * 8 #KBps -> Kbps new_limitKbps = new_limit * 8 #KBps -> Kbps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment