From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-1" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id A592421F1EE for ; Tue, 26 May 2015 03:49:36 -0700 (PDT) Received: from hms-beagle-6.lan ([134.2.89.70]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M2L60-1ZDlKS2GdY-00s6FU; Tue, 26 May 2015 12:49:00 +0200 From: Sebastian Moeller Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Message-Id: Date: Tue, 26 May 2015 12:49:03 +0200 To: =?windows-1252?Q?dave_T=E4ht?= , cerowrt-devel Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) X-Provags-ID: V03:K0:+c3JRnTh/Ji3412SpwbTFL5DVmMyZTJqyOBtgao4sbipx06qBx2 +81CuMbmcia/69X52d0srsSQlTpZ0d4vbb0WhcavbtcXb43/J2bD2zD/9WeTkeV/aPcQHKH 8xyznh3Vf3X9gTfTFP35zQ1tg7FwjYjSLAK4IVLeyJcdrmbmFYmGFjr4FYKgWUjR0IKyULs dnvk5zJBpNP6LAup/MH6Q== X-UI-Out-Filterresults: notjunk:1; Subject: [Cerowrt-devel] policer question X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2015 10:50:26 -0000 Hi Dave, I just stumbled over your last edit of "wondershaper needs to go the way = of the dodo=94; especially the following caught my attention (lines 303 = - 311): ## The ingress policer doesn't work against ipv6, so if you have mixed = traffic ## you are not matching all of it, and the policer fails entirely ## A correct, modern line for this would be: ## tc filter add dev ${DEV} parent ffff: protocol all match u32 0 0 \ ## police rate ${DOWNLINK}kbit burst 100k drop flowid :1 ##=20 ## Even if it did work, the police burst size is too small for higher = speed=20 ## connections and what I suggest above for a burst size needs to be=20 ## a calculated figure.(that one works ok at 100mbit) I think we should implement a policer setting in SQM (if only for = testing) so I wonder how to set the burst size? I think we basically can run the policer only X times per second, so we = should allow something along the lines of: bandwidth [bits/sec] / X [1/sec] =3D max bits in batch [bits] Since in the end, we only can work in bursts/batches we need to figure = out what worst-case batches to expect.=20 Now it would be sweet if we could get a handle on X, but what about just = using the following approximation: How often does the policer run per second worst case? 100[kB]*1000*8 =3D 800000 [bit] (100*1000^2 [bit/sec] / (100*1000*8) [bit]) =3D 125 1/sec or 8 = milliseconds per invocation So your example seems to show that if we can run 125 times per second we = will be able to drain enough packets so we do not drop excessively many = packets. This bursting issue will increase the latency under load for = sure, but I guess not more than 8ms on average?.=20 Now, I guess one issue will be that this is not simply dependent = on either data size or packet count, but probably we are both limited at = how many packets per second we can process as well as how many bytes. So = what about: burst =3D (bandwidth [bits/sec] / 125 [1/sec]) / (1000*8) [kB] This is probably too simplistic, but better than nothing. I would appreciate any hints how to improve this; so thanks in advance. = Now all I need to do is hook this up with sqm-scripts and then go test = the hell out of it ;) Best Regards Sebastian