Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-15-2014, 09:28 PM
|
#1
|
Member
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349
Rep: 
|
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?
|
|
|
01-16-2014, 04:13 PM
|
#2
|
Member
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891
Rep: 
|
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.
|
|
|
01-16-2014, 04:50 PM
|
#3
|
Member
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349
Original Poster
Rep: 
|
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.
|
|
|
01-17-2014, 12:04 PM
|
#4
|
Member
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891
Rep: 
|
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.
|
|
|
01-17-2014, 01:15 PM
|
#5
|
Member
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 349
Original Poster
Rep: 
|
Quote:
Originally Posted by baldy3105
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.
|
|
|
All times are GMT -5. The time now is 11:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|