tc (CBQ) and UDP packets
Hello,
I have seen in my site something strange. I use tc-CBQ for bandwidth shaping, and it works properly well. Sometimes i have seen UDP connections spend more bandwidth than i set up to the user. I have 4 sites, and it always happens. Is there a problem with bandwidth shaping and UDP packets?
Thanks a lot in advance.
Pablo Fernandes
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Hi Andy and All,
Thank you so much for your explain. I really apreciated it. I was thiking about this UDP question and bandwidth shaping... i saw the same udp connections pass through the shaping of the cable modem and CBQ in a linux box.
Anyway, this is an example of my CBQ configuration.... Is it ok? This configuration can carry on maximun of 1500 users. After 1500 users, the process ksoftirqd spend 99% of CPU fulltime and the connections get very crap. I'm telling this just because it could help to see if my configurations are o kor wrong. Here it goes:
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1 cbq bandwidth 100Mbit avpkt 1000 cell 8 tc class change dev eth1 root cbq weight 1Mbit allot 1514
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 cbq bandwidth 100Mbit avpkt 1000 cell 8 tc class change dev eth0 root cbq weight 1Mbit allot 1514
tc class add dev eth1 parent 1: classid 1:5 cbq bandwidth 100Mbit rate 135Kbit weight 10Kbit prio 5 allot 1514 cell 8 maxburst 130 avpkt 1000 bounded isolated
tc qdisc add dev eth1 parent 1:5 handle 5 tbf rate 135Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst xxx.xxx.xxx.xxx/32 classid 1:5
tc class add dev eth0 parent 1: classid 1:5 cbq bandwidth 100Mbit rate 40Kbit weight 10Kbit prio 5 allot 1514 cell 8 maxburst 130 avpkt 1000 bounded isolated
tc qdisc add dev eth0 parent 1:5 handle 5 tbf rate 40Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 200 handle 5 fw classid 1:5
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src xxx.xxx.xxx.xxx/32 classid 1:5
I have this last 2 blocks of commands for each user in my ISP. We sells the
speeds: 100Kbps, 150Kbps, 200Kbps, 300Kbps, 450Kbps, 600Kbps, 1000Kbps, 1500Kbps, 2000Kbps. At the example i showed an 135Kbps/40Kbps connection, but it is an exception... we do not have this speed.
I will appreciate any help... really. Thanks a lot in advance.
Pablo Fernandes
-----Ursprüngliche Nachricht-----
Von: Andy Furniss [mailto:[email protected]]
Gesendet: terça-feira, 10 de abril de 2007 23:20
An: Pablo Fernandes Yahoo
Cc: [email protected]
Betreff: Re: [LARTC] tc (CBQ) and UDP packets
Quoted 8 lines · Pablo Fernandes Yahoo
Hello,
I have seen in my site something strange. I use tc-CBQ for bandwidth shaping, and it works properly well. Sometimes i have seen UDP connections spend more bandwidth than i set up to the user. I have 4 sites, and it always happens. Is there a problem with bandwidth shaping and UDP packets?
I have never used CBQ. It could be that you are measuring the bandwidth before the queue - UDP won't usually back off in response to delay/drop like TCP does.
Andy.
_______________________________________________________
Yahoo! Mail - Sempre a melhor opção para você!
Experimente já e veja as novidades.
http://br.yahoo.com/mailbeta/tudonovo/
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 8 lines · Pablo Fernandes Yahoo
Hello,
I have seen in my site something strange. I use tc-CBQ for bandwidth shaping, and it works properly well. Sometimes i have seen UDP connections spend more bandwidth than i set up to the user. I have 4 sites, and it always happens. Is there a problem with bandwidth shaping and UDP packets?
I have never used CBQ. It could be that you are measuring the bandwidth before the queue - UDP won't usually back off in response to delay/drop like TCP does.
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 6 lines · Pablo Fernandes Yahoo
Hi Andy and All,
Thank you so much for your explain. I really apreciated it. I was thiking about this UDP question and bandwidth shaping... i saw the same udp connections pass through the shaping of the cable modem and CBQ in a linux box.
As I said I've not used CBQ - The LARTC section does say it is hard to configure and may not always work.
Quoted 6 lines
Anyway, this is an example of my CBQ configuration.... Is it ok? This configuration can carry on maximun of 1500 users. After 1500 users, the process ksoftirqd spend 99% of CPU fulltime and the connections get very crap. I'm telling this just because it could help to see if my configurations are o kor wrong. Here it goes:
I also haven't tried shaping at ISP sized configurations.
One thing I notice is you attach TBF to classes, I don't see that in the examples.
If the ip addresses are in groups it may be better to read the hashing filters section of the howto and see if the filtering can be optimised.
Maybe someone with more experience of big setups can help you more than me. As a customer I quite like being policed rather than shaped, so that could be something to look into.
Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc