public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  traffic shaping
@ 2006-04-03  2:06 Sven Köhler
  2006-04-03  7:29 ` Uwe Thiem
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sven Köhler @ 2006-04-03  2:06 UTC (permalink / raw
  To: gentoo-user

Hi,

i would like to shape the traffic of my DSL-connection, but somehow i
never really understood the machanisms that linux offers. All the
scripts i wrote were simply worthless somehow, because they didn't
really improve anything.

Is there any application or script that is easy to configure and does
all the necessary things to shape my DSL traffic?


Thanks
  Sven

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user]  traffic shaping
  2006-04-03  2:06 [gentoo-user] traffic shaping Sven Köhler
@ 2006-04-03  7:29 ` Uwe Thiem
  2006-04-03  7:47 ` Boyd Stephen Smith Jr.
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Uwe Thiem @ 2006-04-03  7:29 UTC (permalink / raw
  To: gentoo-user

On 03 April 2006 03:06, Sven Köhler wrote:
> Hi,
>
> i would like to shape the traffic of my DSL-connection, but somehow i
> never really understood the machanisms that linux offers. All the
> scripts i wrote were simply worthless somehow, because they didn't
> really improve anything.
>
> Is there any application or script that is easy to configure and does
> all the necessary things to shape my DSL traffic?

No, because traffic shaping is such a broad field that no simply script can 
cover it. On the other hand, it isn't a mystery either. One can understand 
it. Try Bert Hubert's "Linux Advanced Routing & Traffic Control HOWTO". I 
don't have the URL handy right. Just google for it.

Uwe

-- 
Why do consumers keep buying products they will live to curse?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user]  traffic shaping
  2006-04-03  2:06 [gentoo-user] traffic shaping Sven Köhler
  2006-04-03  7:29 ` Uwe Thiem
@ 2006-04-03  7:47 ` Boyd Stephen Smith Jr.
  2006-04-03 18:50   ` Rumen Yotov
  2006-04-03 11:39 ` Rick van Hattem
  2006-04-03 16:17 ` [gentoo-user] " James
  3 siblings, 1 reply; 6+ messages in thread
From: Boyd Stephen Smith Jr. @ 2006-04-03  7:47 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]

On Sunday 02 April 2006 21:06, Sven Köhler <skoehler@upb.de> wrote 
about '[gentoo-user]  traffic shaping':
> Is there any application or script that is easy to configure and does
> all the necessary things to shape my DSL traffic?

Not at this time.

However, it's actually fairly easy to throw something together with HTB 
that works fairly well.  If you are only matching on protocol (TCP or UDP) 
and (source or destination) (IP or port) a custom iproute2 script will not 
be that hard.

tc qdisc created your root HTB(s); tc class creates your child/sibling HTBs 
[classes under the same qdisc can swap bandwidth]; tc filter decides what 
classes receive packets.

Hit the TLDP Advanced Routing HOWTO and just hit the parts about HTB and tc 
filter.  Then, go to the HTB site and read the user documentation there.  
Then come back and read the tc filter stuff again -- expect to learn a 
little to a lot about how a packet looks be it IP, TCP, or UDP.

Write some scripts and experiment, you won't get it perfect the first time 
but after a little bit of work you'll find your browsing experience much 
better.  Your filtering policies won't match mine, so it's hard to give a 
single script.  I find it works best to load up your connection then start 
experimenting with a network monitor in another window -- you'll be able 
to see changes quickly and (at least with HTB) you won't drop packets just 
because you were changing settings.

When it comes down to it, if you are killing your upstream /something/ is 
going to suffer, tc just lets you put the pain where you want it; if you 
regularly saturate your upstream, buy fatter pipes.  TC WILL NOT HELP AN 
OVERLOADED DOWNSTREAM since it has no control over what packets are sent 
to you.

If your requirements are fairly simple, send it my way and I'll try to 
write out a script for you; I know I need more practice.

-- 
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user]  traffic shaping
  2006-04-03  2:06 [gentoo-user] traffic shaping Sven Köhler
  2006-04-03  7:29 ` Uwe Thiem
  2006-04-03  7:47 ` Boyd Stephen Smith Jr.
@ 2006-04-03 11:39 ` Rick van Hattem
  2006-04-03 16:17 ` [gentoo-user] " James
  3 siblings, 0 replies; 6+ messages in thread
From: Rick van Hattem @ 2006-04-03 11:39 UTC (permalink / raw
  To: gentoo-user; +Cc: Sven Köhler

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

On Monday 03 April 2006 04:06, Sven Köhler wrote:
> Hi,
>
> i would like to shape the traffic of my DSL-connection, but somehow i
> never really understood the machanisms that linux offers. All the
> scripts i wrote were simply worthless somehow, because they didn't
> really improve anything.
>
> Is there any application or script that is easy to configure and does
> all the necessary things to shape my DSL traffic?
>
>
> Thanks
>   Sven
From what I've heard, this script should be pretty easy to use: 
http://monkey.org/~marius/pages/?page=trickle

-- 
Rick van Hattem	Rick.van.Hattem(at)Fawo.nl

[-- Attachment #2: Type: application/pgp-signature, Size: 200 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gentoo-user]  Re: traffic shaping
  2006-04-03  2:06 [gentoo-user] traffic shaping Sven Köhler
                   ` (2 preceding siblings ...)
  2006-04-03 11:39 ` Rick van Hattem
@ 2006-04-03 16:17 ` James
  3 siblings, 0 replies; 6+ messages in thread
From: James @ 2006-04-03 16:17 UTC (permalink / raw
  To: gentoo-user

Sven Köhler <skoehler <at> upb.de> writes:


> i would like to shape the traffic of my DSL-connection, but somehow i
> never really understood the machanisms that linux offers. All the
> scripts i wrote were simply worthless somehow, because they didn't
> really improve anything.

> Is there any application or script that is easy to configure and does
> all the necessary things to shape my DSL traffic?

First you need really good network management and monitoring. Nagios,
big brother, and Jffnms are just a few of the choices (jffnms is my choice)
and an ebuild is available. Network monitoring will ensure you do not have 
any bottlenecks behind your ADSL connection. The first/best thing you 
can do is to monitor your internal traffic, to figure out where you need 
to concentrate (hardware and protocols).

Then you optimize your firewall/bridge/router to what works best for you.
Last you look external, to optimize what you are getting and see if what 
you are doing can be 'outsourced' like DNS services. Having multiple 
secondary dns servers, strategically located around the internet can 
be a big help, particually if you are serving up lots of small datagrams 
to a large variety of web-surfers. 


You may also be able to pay the carrier/provider some
more money and get more bandwidth. Inquire about CIR or Commited 
Information Rate (guaranteed bandwidth) as some aDSL providers will 
increase  this setting, for a few extra dollars per month. Many 
aDSL providers have greatly over subscribed
their connection from their interexchange points (where they hand off 
internet traffic to other networks). These problems are difficult to 
diagnose, and may be transient. Other aDSL providers such as large 
brain-dead carriers set the CIR to Zero, thus giving everyone great
bandwidth(reletively) but then during peak demand their networks clog will
collisions. Unfortunately, particulary here in the US, the carriers 
are quite stupid and have 'pink slipped' most of their computer scientists 
and  electrical engineers, and they have hired more sales,
marketing and data-base weenies.... Lots of folks that do not know
anything about communications.

aDSL suffers form another unique hardware problem. The current 
( available power) is limited if you are in a wire bundle that is 
carrying lots of aDSL or digital information. Often, when somebody orders a
service, such as aDSL or ISDN, the tech sorts thru the cable pairs at the
terminal blocks down the street and finds the cleanest pairs for the 
new circuit. They migrate the olders services to 'wiring pairs' of lesser
quality. Often the problem is due to corrosion on the terminal blocks. The
bottom line is these carriers are full of idiots and persons not 
qualified to run a network. Here in the US, we're down
to 3 carriers, and they all SUCK. If these idiots can't maintain their
wiring infrastructure, will you trust them to run swithes, routers
and DACs? Many of these carriers are plagued by swams of critical services
that run on the MicroSuck operating system.....

I finally tracked down a problem with my cable modem bandwidth to the RG-59
cable from my home to the terminal block. The dB reading were horribly low.
I had to supply RG-6 (better grade of coax) cable to the technician 
because the cable company is too cheap, stupid, and has no competition. 
If you are nice  to the technicians some of them will help you 
'off the record'. If helps if you can develop a business/personal 
relationship with the tech and the persons that run the equipment.
(I digress much... but this hits  a nerve with me....) There 
is absolutely nothing wrong with aDSL, except the idiot
managers that runs these global communications companies and their 
consistent string of bad decisions.

Monitoring the Internet, is not a bad idea, if you have the time. I can't
remember the name of the software, but it is burried somewhere in the 
NANOG archives.... If what you find is outmoded (based on something like
traceroute) then just find a good security hacking site, as those guys 
stay up on the latest in global network monitoring....

Outside bandwidth testing is possible via these sites:
http://www.speakeasy.net/speedtest/
http://web.tampabay.rr.com/giis/
http://www.dslreports.com/stest

Many others exist; take these results, with caution as to the
accuracy and validity.

This is a deep subject, that is affected by many things. If you build your
own router on a 2.6 linux kernel, there are many things to consider and 
test. 

Beside how you implement your firewall/bride/router rules, there are 
other things you can adjust, under the Networking:QoS and fair queuing, 
when you build thekernel for your primary device connected to the aDSL
connection. PPPoE can be problematic (i.e. not very efficient) if the 
aDSL carrier has a poor implementation or overloaded the resources on 
their side.

The simple solution, is to 'pony up more cash per month' to your aDSL
carrier, or find another bandwidth supplier (if that an option).
You might also have a wireless internet operator in your area. 
Depending on your network you may be able to migrate/split your traffic 
across multiple connections.... 

One of the other respondants mentioned HTB, Hardware Token Buckets, 
which is really a very cool, but a very young technology in Linux. I'm 
still looking for  accurate bandwidth mesuring/monitoring software, 
based on HTBs:

http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm

I refer to them as Hardware Token Buckets, because that's where software,
meets hardware, in the general area of firmware. The linux scheduler 
choices,even RTlinux hacks are actually piss-poor, when you compare 
their performance
to that of state machines or an efficient RTOS.   The decision of how
a schedulers is implemented in a state machine/RTOS/Kernel effects the
performance of what you really want to acheive. Intimate knowledge of the
underlying hardware (processor) is the key to efficient implementation of
schedulers and HTBs. Many of the developers working on providing HTBs in 
Linux, really need help from real hardware engineers..... But 
eventually, the  implementation of HTBs will be mastered by the 
linux kernel folks......

Obviously a stong, jaded opinion, apologies in advance to all I have
offended, with these truths.....



HTH,

James



-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user]  traffic shaping
  2006-04-03  7:47 ` Boyd Stephen Smith Jr.
@ 2006-04-03 18:50   ` Rumen Yotov
  0 siblings, 0 replies; 6+ messages in thread
From: Rumen Yotov @ 2006-04-03 18:50 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

Hi,
On Mon, 2006-04-03 at 02:47 -0500, Boyd Stephen Smith Jr. wrote:
> On Sunday 02 April 2006 21:06, Sven Köhler <skoehler@upb.de> wrote 
> about '[gentoo-user]  traffic shaping':
> > Is there any application or script that is easy to configure and does
> > all the necessary things to shape my DSL traffic?
> 
...SKIP...
Check "trickle" (comes from OpenBSD) latest version is 1.06.
Bad thing is that currently it's masked for removal as being
unmaintained since 2003, plus there's an open Bug, doesn't compile
(126597).
As i got interested managed to make it compile (check the Bug).
Be warned i still haven't tested it, but by man pages desc. its' usage
is quite/very simple (both as a daemon or run on command line).
Can shape both incoming and up-going connections.
If it's working will hate to see it go.
HTH.Rumen

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3409 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-04-03 18:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-03  2:06 [gentoo-user] traffic shaping Sven Köhler
2006-04-03  7:29 ` Uwe Thiem
2006-04-03  7:47 ` Boyd Stephen Smith Jr.
2006-04-03 18:50   ` Rumen Yotov
2006-04-03 11:39 ` Rick van Hattem
2006-04-03 16:17 ` [gentoo-user] " James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox