RE: Latency of Linux Bridge

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



you wrote:
================
What hardware, and setup scripts?
If you are using netem then it can add latency.  The amount depends
on the requested delay and the HZ value of the kernel and the choice
of PSCHED_CLOCK_SOURCE in the kernel configuration. 
================

the latency is already there without having netem running.
Only kernel + brctl to configure the bridge shows the described latency of 5ms.

Hardware does not matter.
I tried on a 500MHz Pentium and also on Pentium III with 3GHz and 1GB RAM.

top always shows me a CPU usage less than 0.5%, load average 0.1 while the bridge is handling roughly 64kBit/sec.
I can still measure a variable delta between packets of 5ms-10ms.

I am using 3 PCs, one is the Linux-Box acting as bridge 

setup scripts, nothing in special:

brctl addbr br0
brctl addif br0 eth0 
brctl addif br0 eth1

ifconfig eth0 up
ifconfig eth1 up
ifconfig br0 up

the other 2 PCs are connected to either side of the bridge, running ethereal.
In my case I have 2 Phone systems generating continous traffic. Each system is sending out packets every 30ms.
If I compare the 2 traces I can see that after the bridge the timings are different then before the bridge.
The difference is always in steps of 5ms. 
so, on sending side is always 30ms difference between each packet
on receiving side - after the bridge - the delta is then 25,30,35, or 40ms.

i am not sure, what you mean with "The amount depends on the requested delay".
I would require an accuracy of about 0.5ms - 1ms

on top of that I will then start with "tc qdisc netem" to start my emulation lateron.
But as long as the accuracy of the bridge as such is that imprecise, this is not the best basis for my target.

you wrote:
===============
The amount depends
on the requested delay and the HZ value of the kernel and the choice
of PSCHED_CLOCK_SOURCE in the kernel configuration. 
===============
Sorry, but I am not so good in kernel compiling.
Where can I find these values. I was grep-ing the whole kernel-sources and could not find it.
also make menuconfig did not provide me these settings (at least I could not find them).
Could you please give me a hint where to start searching?

thanks,
Christian


-----Original Message-----
From: Stephen Hemminger [mailto:shemminger@xxxxxxxx]
Sent: Samstag, 23. Juli 2005 01:49
To: Christian Konecny (VI/SEA)
Cc: lartc@xxxxxxxxxxxxxxx
Subject: Re:  Latency of Linux Bridge


On Fri, 22 Jul 2005 09:55:25 +0200
"Christian Konecny (VI/SEA)" <christian.konecny@xxxxxxxxxxxx> wrote:

> Hi there!
> 
> I am working a lot with VoIP in my company, so I thought to use linux
> bridge functionality together with tc to emulate delay, jitter,
> packet loss, duplication, reordering etc. for testing purposes in our
> lab against our VoIP products. I just recognized, that a basic bridge
> just with it's minumum configuration of 2 network interfaces creates
> latency of approx. 5ms on very low traffic. This seems to be
> independent on CPU speed. I tried on 2 GHz PC while having just
> 64kBit traffic with packet size of about 300bytes. I am using Knoppix
> 3.82 which is actually a debian Live-CD Linux, Kernel 2.6.11. For
> some reason they put iproute2 041019 on this distro, which is
> intended to be used for kernel 2.6.9. I am aware of remastering the
> CD, but have to check if it is possible to recompile the kernel for
> the remaster.
> 
> back to my question: where does this latency come from?
> "top" shows almost no load while the bridge is handling traffic, so
> how come? is there some timer-granularity which can be set in the
> kernel, is the latency normal, or what could cause it else?
> 
> Thank you very much in advance!
> 
> /Christian
>
What hardware, and setup scripts?
If you are using netem then it can add latency.  The amount depends
on the requested delay and the HZ value of the kernel and the choice
of PSCHED_CLOCK_SOURCE in the kernel configuration. 
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux