From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Explanation reqd. for few (more than few!) concepts in TC <long>
Date: Tue, 28 Oct 2003 18:08:09 +0000 [thread overview]
Message-ID: <marc-lartc-106736459906628@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106732522922215@msgid-missing>
On Tuesday 28 October 2003 08:06, Suraj Shankar wrote:
> Hi all,
> I am a system administrator trying to understand tc.
> I have been following the lartc documentation along
> with a few others. I am unable to understand few
> things explained in the howtos. Kindly help me with
> the same ...
> 1) Can somebody tell me the exact difference between a
> class and a qdisc? Martin Brown did try to explain to
> me but, I couldn't understand!
You have 2 types of qdiscs. The root qdisc is attached to the device it self
and all packets are queued in this qdisc. If this is a class-full qdisc
(like htb or cbq) you can add class. A class can contain some packets. You
can stack the classes so you can add a class to a class. So a packet enters
the root qdisc and is redirected to a class by a filter. You need to create
your filters in such way that the packets are placed in a class that contains
no other classes. This class is named a leaf class.
But the leaf class only contains the traffic and can not send them. To do so,
you need to add a qdisc to that class. It's the qdisc that will send the
packets. This can be a class-full qdisc so you can add classes, and restart
the setup. But that will be a waste of CPU cycles. It's better to add a sfq
qdisc or a fifo.
So, you have 1 root qdisc, some classes, some special classes : leaf-classes
and an other set of qdiscs.
> 2) When we talk about pfifo, what is the 'pack size'
> understood to be; example, when I set limit to 10
> (packets), how many bytes is my bucket?
Pfifo holds packet, so the total bytes depends on the size of your packets :
tot_bytes = bucket * size_packets.
You can also use bfifo. This is a bucket expressed in bytes.
> 3) 'HTB is suited for fixed bandwidth' ... by "fixed"
> what exactly is meant ... meaning can it be used where
> bandwidth is shared but at almost always a certain
> "fixed" bandwidth is available (even if available
> bandwidth exceeds, it will be by only a few bytes, for
> a short duration)?
Fixed means that you always have the same bandwidth available on the link. So
no burst. This is needed because you have to make sure YOU are the
bottleneck so if you have a 1000kbit/s link, you have to make sure you never
send more then 996kbit/s.
> 4) Can somebody suggest which qdisc is most ideal (for
> shaping and scheduling) in a n/w where the ISP provies
> a (512Kbit) pipe, which is shared by multiple (4)
> clients but, an average of 45bytes can be expected at
> any point in time (although, it might exceed this)?
That's a difficult one, because YOU have to be the bottleneck to get some good
shaping results. You can try the htb or the cbq qdisc and take a higher ceil
then your link. You will not be the bottleneck and loose some control.
> 5) The lartc howto speaks about 'mpu' with reference
> to TBF, and states "for ethernet, no packet uses less
> than 64 bytes", can you please tell me whether 64
> bytes is the least possible; meaning adding 20 bytes
> of IP and 28 bytes of TCP, I believed a TCP/IP packet
> with no payload could exist of 48 bytes, is this
> possible? and if a payload must be added, should it be
> 16 bytes atleast, can I not have a 52 byte ethernet
> packet? Kindly explain.
> Also, I am unable to see such a parameter when I do a
> tc...help, for TBF.
Sorry, no idea.
> 6) Could you please define the 'cell' parameter in a
> CBQ?
If you have a bounded class, the ceil is the rate. If it's not bounded, the
ceil will be the rate of a bounded parent class.
> Also, I am unable to see maxburst, minburst, minidle,
> mpu, rate parameter options when I do a ... for ex. :
> 'tc qdisc add dev eth0 handle 1 root cbq help'
Just take some example tc commands and copy the parameters you don't know.
The only parameters you have to change is rate and weight.
> 7) How do I set WRR, link sharing and borrowing
> parameters using TC?
Do you mean the wrr qdisc? See the homepage of the wrr qdisc.
> 8) Also, please pardon my ignorance but, do I need a
> filter for a classless qdisc, cause if I were to
> attach a classless qdisc to the root qdisc then by
> default all packets enter this qdisc and I believe I
> wouldn't have the scope to classify ... right/wrong?
Do you mean adding a class qdisc as the root qdisc or adding a class qdisc to
a root qdisc? If you replace the root qdisc with a class less qdisc, you
don't need a filter. If you add the class root qdisc to a root qdisc, you
need a root qdisc with classes and add the class qdisc to a class. So you
need some filters to put the packets from the root qdisc to the class where
the class qdisc is attached to.
More information on the subject can be found on http://www.docum.org.
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/
next prev parent reply other threads:[~2003-10-28 18:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-28 7:06 [LARTC] Explanation reqd. for few (more than few!) concepts in TC <long> Suraj Shankar
2003-10-28 18:08 ` Stef Coene [this message]
2003-10-28 18:08 ` Damjan
2003-10-29 14:23 ` Suraj Shankar
2003-10-29 15:02 ` Suraj Shankar
2003-10-29 15:07 ` Suraj Shankar
2003-10-29 18:41 ` Stef Coene
2003-10-29 18:59 ` Stef Coene
2003-10-30 5:54 ` Suraj Shankar
2003-10-30 6:10 ` Suraj Shankar
2003-10-30 10:38 ` Stef Coene
2003-10-30 10:43 ` Stef Coene
2003-10-31 7:23 ` Suraj Shankar
2003-10-31 9:47 ` 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-106736459906628@msgid-missing \
--to=stef.coene@docum.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.