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@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc