I''m a tc newbie, and I think I am close to being able to use it to control one of the virtual web sites on our Gentoo Linux server. The site has it''s own IP address. I have a bit of a problem in that the way I originally configured tc, the busy site grabbed all the bandwidth, leaving none for the other (and more important) sites. Here is how I had configured it: tc qdisc replace dev $NIC root tbf rate $RATE_TOTAL latency 50ms burst $BURST The total data rate was pegged within acceptable limits, but the problem is that data stopped flowing after tc was active after a few hours. The busy site had a few peak periods and presumably used up all the traffic allotment. Perhaps tc remembers the traffic between invocations? I then tried a slightly more sophisticated setup: tc qdisc del dev $DEV root tc qdisc add dev $NIC root handle 1: cbq avpkt 1000 bandwidth 1000mbit tc class add dev $NIC parent 1: classid 1:1 cbq rate $RATE_PROBLEM allot 1500 prio 5 bounded # isolated tc filter add dev $NIC parent 1: protocol ip prio 16 u32 match ip dst $IP flowid 1:1 Unfortunately, I still don''t get any traffic flowing while tc is active now. Seems that I need to reset something. Any suggestions? I''ve shut down the problem site and disabled tc while I try to figure out a solution. Thanks for your help! Mike mslinn at mslinn.com
Mike Slinn wrote:> I''m a tc newbie, and I think I am close to being able to use it to > control one of the virtual web sites on our Gentoo Linux server. The > site has it''s own IP address. I have a bit of a problem in that the way > I originally configured tc, the busy site grabbed all the bandwidth, > leaving none for the other (and more important) sites. Here is how I > had configured it: > > tc qdisc replace dev $NIC root tbf rate $RATE_TOTAL latency 50ms > burst $BURST > > The total data rate was pegged within acceptable limits, but the problem > is that data stopped flowing after tc was active after a few hours. The > busy site had a few peak periods and presumably used up all the traffic > allotment. Perhaps tc remembers the traffic between invocations? > > I then tried a slightly more sophisticated setup: > > tc qdisc del dev $DEV root > tc qdisc add dev $NIC root handle 1: cbq avpkt 1000 bandwidth 1000mbit > tc class add dev $NIC parent 1: classid 1:1 cbq rate $RATE_PROBLEM > allot 1500 prio 5 bounded # isolated > tc filter add dev $NIC parent 1: protocol ip prio 16 u32 match ip > dst $IP flowid 1:1 > > Unfortunately, I still don''t get any traffic flowing while tc is active > now. Seems that I need to reset something. Any suggestions? I''ve shut > down the problem site and disabled tc while I try to figure out a solution. > > Thanks for your help! > > Mike > mslinn at mslinn.com >From your other post I see 2.6.8.3 - I had to patch 2.6.8.1 to fix a TC options related panic. I don''t know if it''s in 2.6.8.3 already, though. http://www.linuxhq.com/kernel/v2.6/9-rc2/net/sched/sch_api.c Andy. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
I''m a tc newbie, and I think I am close to being able to use it to control one of the virtual web sites on our Gentoo Linux server. The site has it''s own IP address. I have a bit of a problem in that the way I originally configured tc, the busy site grabbed all the bandwidth, leaving none for the other (and more important) sites. Here is how I had configured it: tc qdisc replace dev $NIC root tbf rate $RATE_TOTAL latency 50ms burst $BURST The total data rate was pegged within acceptable limits, but the problem is that data stopped flowing after tc was active after a few hours. The busy site had a few peak periods and presumably used up all the traffic allotment. Perhaps tc remembers the traffic between invocations? I then tried a slightly more sophisticated setup: tc qdisc del dev $DEV root tc qdisc add dev $NIC root handle 1: cbq avpkt 1000 bandwidth 1000mbit tc class add dev $NIC parent 1: classid 1:1 cbq rate $RATE_PROBLEM allot 1500 prio 5 bounded # isolated tc filter add dev $NIC parent 1: protocol ip prio 16 u32 match ip dst $IP flowid 1:1 Unfortunately, I still don''t get any traffic flowing while tc is active now. Seems that I need to reset something. Any suggestions? I''ve shut down the problem site and disabled tc while I try to figure out a solution. Thanks for your help! Mike mslinn at mslinn.com