LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-15-2014, 09:28 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Rep: Reputation: Disabled
tc speed measurement discrepancies


this has been a tiny issue i've noticed since applying htb rate limits to my router. i'm limiting to slightly under what Comcast is giving me - measured at speedtest.net or using wget downloads, they give me ~105.6-105.8mbit down and 21-21.4mbit up. so i have this subsection ("external" is iface to cable modem, "internal" to LAN) which slows traffic down minutely below these measurements - my intention is to yield 105.4mbit down and 20.5 up:

Code:
tc qdisc add dev external root handle 1: htb default 1
tc class add dev external parent 1: classid 1:1 htb rate 22.45mbit burst 9k

tc qdisc add dev internal root handle 1: htb default 1
tc class add dev internal parent 1: classid 1:1 htb rate 109.2mbit burst 15k
as you can see, i've had to raise the speed numbers considerably from the measured numbers. initially setting the rates to 105.4 on internal and 20.5 on the external gave me measured speeds of ~102 down and ~19.8 up, and i've slowly increased the numbers to get measured results at my desired target speeds.

so is this normal? and what's the reason for the differing of the numbers here?
 
Old 01-16-2014, 04:13 PM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
the token bucket is calculated based on a time constant Tc = Bc/Cir

15k/105M = .000143 - down in the nano second range. Cisco, on their traffic shapers recommend a Tc of around .125S so normaly suggest a Bc of 1/8th of Cir. If you leave the burst and therefore Tc too low the effect you get is a lower throughput than you asked for.

So try increasing burst to about 1/8th of rate and see if that helps.
 
Old 01-16-2014, 04:50 PM   #3
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
1/8th of 105,000,000 is 13,125,000..... so seriously, a burst of 13m??

EDIT: tried that, no change. setting 105mbit with burst 0f 13.125m still gives me measured results of ~102. just to rule out comcast maybe not giving me the full 105, i tried lowering the values - 40mbit with burst of 5m - that yielded 38.59mbit measured. which seems like about the same percentage of difference as my 105mbit/13.125m burst testing

Last edited by psycroptic; 01-16-2014 at 05:20 PM.
 
Old 01-17-2014, 12:04 PM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Yep, that would be what you would use on a Cisco router, low Burst is such a common problem that it turns up in the exams.

Interesting it made no difference though. Does wget and speedtest take tcp overhead ont account when ,measuring? Maybe thats enough to account for it.
 
Old 01-17-2014, 01:15 PM   #5
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by baldy3105 View Post
Does wget and speedtest take tcp overhead ont account when ,measuring? Maybe thats enough to account for it.

No idea if they do, and very little information came up when I searched for whether either one does. But could tcp overhead really eat up 3-4% of the bandwidth?

I don't necessarily MIND if i have to raise the numbers in my tc script to achieve a certain speed, i just would like to make sure that it's not because i've misconfigured something.
 
  


Reply



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
14.1 Install on a Thinkpad W530.... where is elilo; fdisk and cgdisk discrepancies bimboleum Slackware - Installation 2 12-20-2013 04:45 AM
Ajax discrepancies bluegospel Programming 7 11-18-2011 11:40 AM
traffic measurement Baltasar Linux - Software 5 03-10-2005 11:53 AM
Bandwidth measurement Erik Thorsson Linux - Software 2 01-10-2005 09:07 AM
bandwithd measurement slack66 Linux - Networking 1 09-23-2003 09:21 PM

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

All times are GMT -5. The time now is 02:57 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