From: "Chris Bennett" Date: Tue, 12 Apr 2005 17:27:44 +0000 Subject: Re: [LARTC] HTB ATM MPU OVERHEAD (without any patching) Message-Id: <001301c53f84$eff1a070$200fa8c0@DELTA> List-Id: References: <001001c53ef2$d4a1d2f0$200fa8c0@DELTA> In-Reply-To: <001001c53ef2$d4a1d2f0$200fa8c0@DELTA> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org I was able to do some further testing today with a full crew of players on = my game servers. I cleaned up my script a bit to make it easier to modify = the MPU and OVERHEAD, and also added both settings to the root class for=20 completeness sake (not sure that matters at all). I'll include the final=20 script at the end for posterity. The final result (in my case) that worked best: I kept rate at 695 (which is my provisioned upload rate of 768 * 48 / 53, t= o=20 account for ATM overhead) I left to MPU at 96 (since it takes two ATM packets (2 * 48) for the minimu= m=20 ethernet packet) For overhead, I went with 50. This is higher than the calculated the=20 "optimum" of 24 (half of an ATM packet). I thought about why the overhead value of 50 works best, and I really can't= =20 say for sure. For a while I was thinking about the possibility that I had = the calculation wrong and that an overhead of 48 might make more sense=20 (since a full packet is still necessary to carry any non-packet-aligned=20 leftover data), but 48 + x still means that we accounted for x more bytes=20 than necessary (with x being between 0-47), which means that overall it=20 should average out to an overhead of 24 for all packets. So I just don't=20 know. Apparently, for whatever reason, there appears to be more overhead=20 than expected, though. This is working beautifully in any case. A usual glance at my players has = them showing pings from 70 up to 300 or so (people with higher pings tend t= o=20 leave since it becomes unplayable). For this series of tests I latched=20 onto a few player with particularly low pings, and then started an FTP=20 transfer to my shell account at my ISP. With these settings there was a=20 slight initial bump of just a few milliseconds, but after a minute the ping= s=20 actually returned to where they had been in the beginning. So yes, I am=20 saying that there was ZERO latency increase for the players. I'm amazed. While the overhead of 50 is higher than expected, it does appear to be very= =20 close to optimum. Even dropping it to 40 causes noticeable differences if = I=20 let the FTP transfer run for a long time. In essence the overhead value is= =20 serving here as the tuning between large and small packets, with higher=20 overheads giving more weight to the smaller packets. I don't want to give = too little weight to the small packets because then there is not enough=20 bandwidth reserved for them. Too much weight causes too much bandwidth to = be reserved, forcing the big packets to needlessly slow down. In my case 5= 0=20 works just perfectly, though for other people different values may be found= =20 to be appropriate. I'm sure that an IPROUTE2 patched with the Wildgoose ATM patch works even=20 better, but for an unpatched IPROUTE2 I think this is working pretty darn=20 well. This is the final cleaned up partial script I ended up with: CEILi5 MPU=96 OVERHEADP # create HTB root qdisc tc qdisc add dev eth0 root handle 1: htb default 22 # create classes tc class add dev eth0 parent 1: classid 1:1 htb \ rate ${CEIL}kbit \ mpu ${MPU} \ overhead ${OVERHEAD} # create leaf classes # ACKs, ICMP, VOIP tc class add dev eth0 parent 1:1 classid 1:20 htb \ rate 50kbit \ ceil ${CEIL}kbit \ prio 0 \ mpu ${MPU} \ overhead ${OVERHEAD} # GAMING tc class add dev eth0 parent 1:1 classid 1:21 htb \ rate 600kbit \ ceil ${CEIL}kbit \ prio 1 \ mpu ${MPU} \ overhead ${OVERHEAD} # NORMAL tc class add dev eth0 parent 1:1 classid 1:22 htb \ rate 15kbit \ ceil ${CEIL}kbit \ prio 2 \ mpu ${MPU} \ overhead ${OVERHEAD} # LOW PRIORITY (WWW SERVER, FTP SERVER) tc class add dev eth0 parent 1:1 classid 1:23 htb \ rate 15kbit \ ceil ${CEIL}kbit \ prio 3 \ mpu ${MPU} \ overhead ${OVERHEAD} # P2P (BITTORRENT, FREENET) tc class add dev eth0 parent 1:1 classid 1:24 htb \ rate 15kbit \ ceil ${CEIL}kbit \ prio 4 \ mpu ${MPU} \ overhead ${OVERHEAD} # attach qdiscs to leaf classes - using SFQ for fairness tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth0 parent 1:21 handle 21: sfq perturb 10 tc qdisc add dev eth0 parent 1:22 handle 22: sfq perturb 10 tc qdisc add dev eth0 parent 1:23 handle 23: sfq perturb 10 tc qdisc add dev eth0 parent 1:24 handle 24: sfq perturb 10 # create filters to determine to which queue each packet goes tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 20 fw flowid=20 1:20 tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 21 fw flowid=20 1:21 tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 22 fw flowid=20 1:22 tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 23 fw flowid=20 1:23 tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 24 fw flowid=20 1:24 ----- Original Message -----=20 From: "Jason Boxman" To: Sent: Monday, April 11, 2005 7:14 PM Subject: Re: [LARTC] HTB ATM MPU OVERHEAD (without any patching) > Those are always the thoughts I had. I never successfully played around = > with > overhead or MPU though. Did you compare results with and without using > overhead and mpu settings? _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc