LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2013, 11:24 AM   #1
tkmbe
Member
 
Registered: Jun 2005
Location: Obera, Argentina
Distribution: OpenSuse 10.3, Debian 4.0, Debian 3.1
Posts: 38

Rep: Reputation: 15
How to shape traffic with burst???


Hello

I have the following "qos" script to limit the download traffic of clients on my router:

Code:
...
for i in $hosts; do
  host="$base.$i"
  echo "Creating $RATE class for host $host"
  $tc class add dev $DEV parent 1:0 classid 1:$i cbq bandwidth $DEV_MAX_RATE rate $RATE avpkt 1000 prio 5 bounded isolated \
  allot 1514 weight 1 maxburst 21
  $tc filter add dev $DEV parent 1: protocol ip prio 5 u32 match ip dst $host flowid 1:$i
done
For example download limit is 160kbps for each host.
What I want to add is that each host can use more bandwidth a short time, so "normal" web pages will be loaded "rapidly" and downloads and heavy pages will go with normal download speed.
So normal each host has 160kps but say for 1minute every 20min will download at 512kbps or something similar...

Any hints ideas how to do with burst or anything else?

Thanks a lot

Beat
 
Old 08-23-2013, 05:10 AM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
have you looked at man-pages? http://linux.die.net/man/8/tc-cbq it does have parameters to configure burst

---------- Post added 08-23-13 at 10:11 AM ----------

oh, you use maxburst indeed; what is the question then?
 
Old 08-24-2013, 11:46 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
The "burst" you are talking about with traffic shaping works on a much smaller time scale that you envisage. Its really designed to ensure that a tcp window will be allowed in one go before the shape rate kicks in. It operates on the timescale of a fraction of a second, not what you are imagining. Over a period of seconds upwards it really does limit at an average of "bandwidth"

However having said that, you are not using traffic shaping you are using class based queueing. CBQ does not limit to "bandwidth" it provides a mnimum guarantee of "bandwidth". Bandwidth in this case is a minimum not a maximum.

If you have two classes set for 60/40% bw, either can use 100%. Only when both are contending for link usage will the 60/40% division be imposed on the traffic.

I'm not sure you can do what you are trying to do with normal QoS controls because its not what they are intended for.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on Traffic Shape jarias Linux - Networking 1 06-27-2010 02:17 AM
traffic shape nima0102 Linux - Networking 1 02-21-2009 07:31 AM
traffic control, burst?? blackzone Linux - Networking 2 08-02-2007 03:54 AM
LXer: Shape your traffic with trickle LXer Syndicated Linux News 0 04-13-2007 03:46 PM
Different ways to shape traffic ivanatora Linux - Networking 3 07-19-2004 03:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration