Hello again, I need to change the R2Q for my script, as setting the quantum manually for each class is painful. Can you tell me exactly where to set R2Q = x? I get syntax errors all the time. Should it be specified for each class? I do not know where to place this setting... Thanks in advance, Vlad Mihai _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Tuesday 27 January 2004 00:04, Mihai Vlad wrote:> Hello again, > > I need to change the R2Q for my script, as setting the quantum manually for > each class is painful. Can you tell me exactly where to set R2Q = x?If you add the htb qdisc. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Here is a quote from docum.org: ------------------------------------------------------------------------- Counting packets with quantum can be strange. If we have a low rate class (rate = 5kbit), default quantum = 5000 / 10 = 500 bytes. But most packets are more then 500 bytes. Htb version 1 and 2 uses DRR, so a packet larger then 1000 bytes will be sent and it will remember how much it sent and wait until the packet is paid back before another packet is send. So if you send 1000 byte, next time the class is polled, you will not be allowed to send. Htb3 uses the WRR scheduler. When a packet with size > quantum is sent, it will be sent and an error that the quantum is too small will be logged. But there is no pay back. The WRR scheduler is faster then the DRR scheduler. So make sure quantum is bigger then the default packet size. For 15 kbyte/s and default r2q, quantum is 1500 and this is exactly the maximum packet size. If you want to tune htb for rates smaller then 15 kbyte/s, you can manually set the r2q and/or quantum. ---------------------------------------------------------------------------- Assuming the 5kbit example (kbit not kbytes) and that the R2Q is 10, we can compute the quantum like this: 5 kbit = 5000 bit 5000 bit / 10 = 500 byte Is it bytes or bits? I guess the first term (the rate) is measured in bits and the quantum in bytes. Taking into account the second example (15 kbyte), we compute the quantum like this: 15 kbyte = 15000 byte 15000 byte / 10 = 1500 byte Is it bytes or bits? So, in order to have a fully functional HTB 3 script I need to have each of my class rates bigger than 15 kbyte? This is about 120 kbit. What happens if I need lower rates like 8 kbit? Do I need to set up the quantum manually? Please don''t laugh if I am talking nonsense, but I cannot figure it out... Thanks, Mihai _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Wednesday 28 January 2004 00:18, Mihai Vlad wrote:> Here is a quote from docum.org: > > ------------------------------------------------------------------------- > Counting packets with quantum can be strange. If we have a low rate class > (rate = 5kbit), default quantum = 5000 / 10 = 500 bytes. But most packets > are more then 500 bytes. Htb version 1 and 2 uses DRR, so a packet larger > then 1000 bytes will be sent and it will remember how much it sent and wait > until the packet is paid back before another packet is send. So if you send > 1000 byte, next time the class is polled, you will not be allowed to send. > > Htb3 uses the WRR scheduler. When a packet with size > quantum is sent, it > will be sent and an error that the quantum is too small will be logged. But > there is no pay back. The WRR scheduler is faster then the DRR scheduler. > So make sure quantum is bigger then the default packet size. For 15 kbyte/s > and default r2q, quantum is 1500 and this is exactly the maximum packet > size. If you want to tune htb for rates smaller then 15 kbyte/s, you can > manually set the r2q and/or quantum. > --------------------------------------------------------------------------- > > Assuming the 5kbit example (kbit not kbytes) and that the R2Q is 10, we can > compute the quantum like this: > 5 kbit = 5000 bit > 5000 bit / 10 = 500 byte > > Is it bytes or bits?bytes> I guess the first term (the rate) is measured in bits and the quantum in > bytes.Indeed.> Taking into account the second example (15 kbyte), we compute the quantum > like this: > 15 kbyte = 15000 byte > 15000 byte / 10 = 1500 byte > > Is it bytes or bits?bytes> So, in order to have a fully functional HTB 3 script I need to have each of > my class rates bigger than 15 kbyte? This is about 120 kbit.Indeed.> What happens if I need lower rates like 8 kbit?You can specify a lower r2q if you add the htb qdisc. And/or you can specify quantum when you add a class.> Do I need to set up the quantum manually?If you don''t find a good r2q, yes. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/