LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   A question regarding traffic shaping involving tc-tbf and tc-sfq (https://www.linuxquestions.org/questions/linux-networking-3/a-question-regarding-traffic-shaping-involving-tc-tbf-and-tc-sfq-651339/)

05020241 06-24-2008 01:26 PM

A question regarding traffic shaping involving tc-tbf and tc-sfq
 
Hello all,

I am trying to shape network traffic on an interface (100Mbps) which should only permit 1.5Mbps bandwidth and has sfq filter attached to it. I have used the following tc qdiscs.

$ tc qdisc replace dev eth2 root handle 1: tbf rate 1mbit burst 8kb limit 4096kb peakrate 1.5mbit minburst 1540
$ tc qdisc add dev eth2 parent 1:1 sfq perturb 10 quantum 1514

The problem is that apparently, the bandwidth is not being reduced with the above-mentioned setup. When I have just the token bucket installed, my experiments show that the download rate is far slower than the case when these are rules are used.

What am I doing wrong? Thanks in advance.

--Asim

SCerovec 06-24-2008 03:22 PM

I'm not sure?

I had quite a hard time until I realized that I can only control outbound.

If I try to control inbound, I only 'punish' my self - no control there.

It it helps at all :-(

Now I'm happy with sfq and hfsc and arno's AIF... for a while.

Elomis 06-24-2008 08:58 PM

Quote:

Originally Posted by SCerovec (Post 3193913)
I'm not sure?

I had quite a hard time until I realized that I can only control outbound.

If I try to control inbound, I only 'punish' my self - no control there.

It it helps at all :-(

Now I'm happy with sfq and hfsc and arno's AIF... for a while.

This.

You can't listen slowly, you can only talk slowly.

You can't control the inbound rate of traffic easily, in a lot of cases you can't control inbound rates at all. This is the age old forum post about the housemates in a house trying to limit each person so they don't overcrowd each other's net usage. It's simply (virtually) impossible.

When a host sends you traffic you can't slow down the rate that you receive it because the remote host needs confirmation you received it ok, some equipment 'queues' inbound traffic (sending receipts at the time) and only processes it when other queues of different sorts of traffic are completed, but there is still a time limit and you have still received it in a way, you just haven't processed it yet.

SCerovec 06-27-2008 06:08 AM

For incomming You can set classes (QOS/TOS) so the small packets come in first etc.
And You can limit traffic going from the LAN interfaces to particular clints (delay to a rate).

The best way IMHO is social shapping - ;-)


All times are GMT -5. The time now is 09:39 AM.