From: Patrick McHardy Date: Mon, 06 Jun 2005 14:02:25 +0000 Subject: Re: [LARTC] New HTB-derived qdisc for accounting? Message-Id: <42A45771.3080103@trash.net> List-Id: References: <42A1A26A.1010700@gmx.net> In-Reply-To: <42A1A26A.1010700@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Carl-Daniel Hailfinger wrote: > Patrick McHardy schrieb: > >>Why do you want to decrease speed as the quota is approached? > > > We have two phases (simplified): > 1. Already sent traffic is less than htbq_squota > -> Do not limit anything. > 2. Already sent traffic is more than htbq_squota > -> Limit the rate to something which allows the quota > to be filled completely in the remainig time. > > Most people stay below htbq_squota and do not notice > anything at all, i.e. they get full wire speed. Power users > will cause more traffic than htb_squota and be limited so > they can't get over htbq_quota. Since it is impossible to > send faster than htb_rate, htb_rate will stay constant if > it is fully utilized. If htb_rate is not fully utilized, > the speed will actually *increase* over time. Ok, so why do you want to prevent people from sending from htbq_squota to htbq_quota at full speed? Isn't the important point that noone sends more than their quota? Dynamic rate adaption is not easy, HTB needs pre-calculated rate tables, with HFSC it is even more complicated and can cause short periods of unfairness. >>Wouldn't a simple per-class quota or a quota-ematch work as >>well? > > That would be easier, but I can't see how to realize the > process above with a quota-ematch. Especially the dynamic > rate adaption needs something more than just quota. > Probably one could combine quota-ematch with some userspace > hackery to achieve what I want, but it would require to > statically set up 65536 classes for a /16 network. Hm. > The only difference to my solution would be that we need > a quota ematch instead of a htb_quota qdisc and rate control > would be done in userspace. > > So where can I find code doing a quota ematch? Nowhere I guess, but shouldn't take more than a couple of minutes to write one. It would have the same problems as with iptables however, it doesn't get feedback about dropped packets. A per-class quota inside the qdisc is probably the best way. Regards Patrick _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc