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 09-17-2013, 04:57 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
another tc question, this time about behavior if 2 members of same class are sending


so this is what's going on:

Code:
tc qdisc add dev internal root handle 1: htb default 10
tc class add dev internal parent 1: classid 1:1 htb rate 51.88mbit ceil 51.88mbit
tc class add dev internal parent 1:1 classid 1:10 htb rate 34.38mbit ceil 51.88mbit
tc class add dev internal parent 1:1 classid 1:11 htb rate 12.5mbit ceil 51.88mbit
tc class add dev internal parent 1:1 classid 1:12 htb rate 4.4mbit ceil 51.88mbit
say that 2 members of the default class (1:10) are downloading, and both download streams are capable of >50mbps. I would think that, since the whole class is guaranteed 34.38mbit, each client would balance out at 34.38/2=~17.19mbps.

but that's not what happens; it appears that they each fluctuate between 1 having almost all the ceil bandwidth and the other having a tiny amount. they go back and forth at a somewhat random rate, so the end result is the download speed on each client rises and falls.

why is this? is this to be expected?
 
Old 09-18-2013, 11:43 AM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
This is what you expect to see in a fifo queue. TCP responds to latency and packet loss by slowing down. As one slows down the other picks up the slack, speeding up until it bounces off the bandwidth limit thus increasing the latency it experiences and it throttles back again allowing the other flow to come to the fore. The two TCP flows are both attempting to optimise their thoughput and they are not co-ordinated.

Within a class you get fifo queueing, the only prioritisation or bandwidth occurs between queues, not within a queue.
 
Old 09-18-2013, 02:43 PM   #3
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
I see.

So there wouldn't be a way to force them to balance out evenly then?
EDIT: suppose not.

Well thanks in any case, and also for that other post that I think you replied to.

Last edited by psycroptic; 09-18-2013 at 05:56 PM.
 
Old 09-19-2013, 02:22 PM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
This is actually a subject that can get horrifically complex very quickly. The behaviour of speeding up and slowing down in an effort to maximise throughput in TCP is a combination of "Slow start" and "Congestion Avoidance" behaviour, both designed to even out transmission behaviour.

I've seen degree dissertations done by university graduates that are basically mathematical discussions on how the current methods might be improved!

The thing to worry about is the average thoughput over the duration of the flow, rather than the fluctuations, otherwise you'll give yourself a headache!
 
Old 09-19-2013, 02:41 PM   #5
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
word, thanks for the info. yeah, it's kind of been making my head spin trying to think about traffic flows and where in the chain I need to apply various rules. it's been a good learning experience for understanding how networks operate conceptually.

if you've got any ideas on my new project of limiting upload, feel free to chime in
 
  


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
2 members derailing the thread with trolling behavior nec207 LQ Suggestions & Feedback 13 07-26-2011 07:10 PM
[SOLVED] Function pointers to class members, cpp brazilnut Programming 2 05-26-2010 10:18 AM
CPP: Is it possible to use the members of an inherited class? RHLinuxGUY Programming 5 04-30-2007 02:48 AM
Strange behavior on sizeof(class) The_Nerd Programming 3 10-10-2005 12:22 AM
Inheriting class members (Qt C++, QApplication class) jtshaw Programming 2 01-15-2004 11:52 AM

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

All times are GMT -5. The time now is 08:30 PM.

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