From: Pavlos Parissis <p_pavlos@freemail.gr>
To: lartc@vger.kernel.org
Subject: [LARTC] HTB question
Date: Mon, 13 May 2002 17:30:33 +0000 [thread overview]
Message-ID: <marc-lartc-102131115820965@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101819226308335@msgid-missing>
Hello all,
I have a small problem with HTB which i would like to share with the list.
I have send tha same mail to Martin Devera and he replied but i would like to
post my problem here in order to have more information,because i am new in this
area of administration.
I have the simplest scenario that you can imagine. I have a linux server which have internet
connection with 64Kbps ISDN line using an external modem and behind this server i have 5 WIN
clients. My linux server is RedHat 7.2 with kernel 2.4.17 patched with HTB and i used
the patched tc from Martin Devera site.
My clients use my server as a gateway to the internet. I need to ensure that one WIN client
have 5 kbytes/sec from the total bandwith of 8-9 kbytes when he wants!Why is that?
Because it use a VPN client which needs at least 4 kbytes in order to have useful connection.
As a result i have to devide my 8-9 kbytes/s bandwidth in 2 pieces, one with 5 kbytes and one
with 3-4 kbytes.i created the following script according your guide.
#!/bin/bash
tc="/root/QoS/QoS/tc"
$tc qdisc del dev eth0 root
$tc qdisc add dev eth0 root handle 1: htb default 11
$tc class add dev eth0 parent 1: classid 1:1 htb rate 10kbps ceil 10kbps burst 12910b \
cburst 12910b
$tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5kbps ceil 10kbps burst \
24910b cburst 12910b
$tc class add dev eth0 parent 1:1 classid 1:11 htb rate 2kbps ceil 10kbps burst \
12910b cburst 12910b
$tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.14 \
flowid 1:10
# 192.168.0.14 is the ip of my WIN clients which needs the 4kbytes
$tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
$tc qdisc add dev eth0 parent 1:11 handle 11: sfq perturb 10
I run it and i did some tests.
I use 2 WIN clients which belong to defualt class and started to download 1 big file from each
one. They had 4kbytes/sec download speed when downloading the files.
Then i started to download a big file from my WINclient(192.168.0.14) and he didn't managed to
have more that 3 kbytes download speed.
I run several time tc -s class show dev eth0 and saw that the default class borrowed several
packets.
see what i mean:
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1401248 bytes 944 pkts (dropped 0, overlimits 0)
rate 4037bps 2pps
lended: 455 borrowed: 489 giants: 0
tokens: -3184094 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2603364 bytes 1738 pkts (dropped 0, overlimits 0)
rate 7921bps 5pps
lended: 489 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1202116 bytes 794 pkts (dropped 0, overlimits 0)
rate 3816bps 2pps
lended: 794 borrowed: 0 giants: 0
tokens: 3406788 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1422444 bytes 958 pkts (dropped 0, overlimits 0)
rate 4037bps 2pps
lended: 461 borrowed: 497 giants: 0
tokens: -1783000 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2644242 bytes 1765 pkts (dropped 0, overlimits 0)
rate 7921bps 5pps
lended: 497 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1221798 bytes 807 pkts (dropped 0, overlimits 0)
rate 3816bps 2pps
lended: 807 borrowed: 0 giants: 0
tokens: 3320517 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1430014 bytes 963 pkts (dropped 0, overlimits 0)
rate 4005bps 2pps
lended: 466 borrowed: 497 giants: 0
tokens: -3078483 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2660896 bytes 1776 pkts (dropped 0, overlimits 0)
rate 7921bps 5pps
lended: 497 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1230882 bytes 813 pkts (dropped 0, overlimits 0)
rate 3816bps 2pps
lended: 813 borrowed: 0 giants: 0
tokens: 3320517 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1437584 bytes 968 pkts (dropped 0, overlimits 0)
rate 4005bps 2pps
lended: 471 borrowed: 497 giants: 0
tokens: -5316046 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2676036 bytes 1786 pkts (dropped 0, overlimits 0)
rate 7887bps 5pps
lended: 497 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1238452 bytes 818 pkts (dropped 0, overlimits 0)
rate 3848bps 2pps
lended: 818 borrowed: 0 giants: 0
tokens: 3406788 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1448182 bytes 975 pkts (dropped 0, overlimits 0)
rate 4005bps 2pps
lended: 471 borrowed: 504 giants: 0
tokens: -3276238 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2689662 bytes 1795 pkts (dropped 0, overlimits 0)
rate 7887bps 5pps
lended: 504 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8
mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1241480 bytes 820 pkts (dropped 0, overlimits 0)
rate 3848bps 2pps
lended: 820 borrowed: 0 giants: 0
tokens: 3743680 ctokens: 911840
Then only way to ensure that my 192.168.0.14 client have 4-5 kbytes is when i change the ceil
for the default class to 2.
I also noticed that even i change the rate for default class to 1 they always have 2-3
kbytes/sec.
After several tests i realized that my default class always borrowed packets from my 10 class
even when class 10 use tha bandwidth.As a result i couldn't ensure 4-5 kbytes for class 10.
Does anyone know a way to achive my goal.
I would be grateful if some can give me any hits about it.
Regards,
Pavlos
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I love having the feeling of being in control
while i have the sensation of speed
The surfer of life
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-05-13 17:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-07 15:09 [LARTC] HTB question Omer suat
2002-04-07 15:17 ` Martin Devera
2002-04-07 15:21 ` Stef Coene
2002-05-13 17:30 ` Pavlos Parissis [this message]
2003-04-09 18:06 ` [LARTC] HTB Question Allan Gee
2003-05-23 9:56 ` [LARTC] HTB question Ruslan Spivak
2003-06-28 11:58 ` Lars Landmark
2003-06-28 16:09 ` Stoilis Giannis
2004-01-15 11:07 ` [LARTC] HTB Question hare ram
2006-09-13 14:47 ` [LARTC] HTB question doudouyam
-- strict thread matches above, loose matches on Subject: below --
2003-06-04 20:27 [LARTC] HTB Question TeraHz
2003-06-04 20:46 ` Stef Coene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-102131115820965@msgid-missing \
--to=p_pavlos@freemail.gr \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox