From 44af37bc2b10c67e8b550d21a1eb6eedfbc41b8c Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Fri, 23 Mar 2012 18:18:48 -0700 Subject: [PATCH] Change default period to 100 ms, which seems to help cfs at least... rt is still somewhat broken. --- mininet/node.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mininet/node.py b/mininet/node.py index 9a87468..af5cb09 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -518,7 +518,11 @@ class CPULimitedHost( Host ): self.cgroup = 'cpu,cpuacct:/' + self.name errFail( 'cgcreate -g ' + self.cgroup ) errFail( 'cgclassify -g %s %s' % ( self.cgroup, self.pid ) ) - self.period_us = kwargs.get( 'period_us', 10000 ) + # BL: Setting the correct period/quota is tricky, particularly + # for RT. RT allows very small quotas, but the overhead + # seems to be high. CFS has a mininimum quota of 1 ms, but + # still does better with larger period values. + self.period_us = kwargs.get( 'period_us', 100000 ) self.sched = sched def cgroupSet( self, param, value, resource='cpu' ):