LinuxQuestions.org
Review your favorite Linux distribution.
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 06-21-2010, 12:15 PM   #1
skypixel
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Question HTB shaping and IPERF performance measurents on virtual interfaces


Hello,

I registered today to LQ because there's an issue related to shaping (or better: policing) that I can't solve.

I am doing some network experiments using an IP overlay (made of IP tunnels and virtual interfaces: tap0, tap1, etc...).
I am using the Hierarchical Token Bucket queuing discipline to shape the bandwidth to 10 Mbps, as follows:

Code:
tc qdisc add dev $DEV root handle 1: htb default 1
tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit ceil 10mbit
tc qdisc add dev $DEV parent 1:1 handle 20: sfq limit 20
If I use it on a normal interface (e.g. eth0), and I launch iperf to measure the bandwidth like this:

Code:
iperf -c 10.183.173.134 -i 1 -u -b 12M
the losses registered are proportional to the excess of bandwidth with respect to the shaping limit: in this case 20%.

If I use the shaping on a virtual interface the losses are not proportional to the excess. In fact, they increase abruptly: setting iperf to 12Mbps brings to 97% of losses and an effective bandwidth of some kbps...
What's wrong with shaping of virtual interfaces (or with iperf)...?
Do you have any advice..?

Sorry for my english, that might sound odd.
Thanks in advance for any clarification.
 
Old 06-22-2010, 03:45 AM   #2
skypixel
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Ok, now it's more clear:
when using virtual interfaces as I did you should take into account the additional overhead of the new IP header.
Thus, one should pass a modified MTU value to the iperf tool, using the -l parameter.

Code:
iperf -c 10.0.0.1 -l 1450 -i 1 -u -b 12M
Without it, the UDP packets got fragmented at the IP layer and, as you might know, fragmentation increase the dropping probability.
Next time I'll double check with wireshark before posting...

Thank you anyway.
 
  


Reply

Tags
htb, shaping, virtual device


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
traffic shaping with htb.init rogerdv Linux - Networking 0 03-20-2009 07:03 AM
Problems, Traffic shaping with HTB scuba0 Linux - Networking 4 07-31-2008 11:21 AM
Traffic shaping with HTB, several questions exscape Linux - Networking 1 05-28-2008 12:10 PM
traffic shaping with htb zsoltrenyi Linux - Software 2 11-12-2004 09:17 AM
traffic shaping htb SchwipSchwap Linux - Networking 1 08-28-2003 03:17 PM

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

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