Using Neteto assign per-flow delay

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

 



Hello all,

I would likto usNetem to assign per-flow delay: all packets belonging
to thsamflow (as identified IP addressing 5-tuple) get the same
amounof delay bupackets from different flows will get different
amounof delays. Further, thdelay assigned to a flow is randomly
sampled froa given distribution.

This approach is possiblwith a modified version of dummynein
FreeBSD (for examplin http://www.cs.unc.edu/~jeffay/papers/SIGCOMM-03.pdf
and ihttp://netsrv.csc.ncsu.edu/export/impact_of_background_comp_net_2007.pdf)
buidoesn't appear to be possible with the current version of Netem.

I think I camodify Neteto achieve this but since I am relatively new
to Linux kernel programming. I would likto know whether thfollowing
approach would bthright one:

- Creata dummy devicand use ioctl to pass data for the delay distribution
frouser to kernel.
- Is ipossiblto load/unload Netem as a kernel module (this would make
thkernel developmeneasier since I wouldn't have to compile the kernel
every timI makchanges to the code)?

Any help or suggestions arhighly appreciated!

Thanks,
Ron
Froshemminger alinux-foundation.org  Mon Oct  8 13:56:49 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: MoOc 8 13:57:26 2007
Subject: Using Neteto assign per-flow delay
In-Reply-To: <7a1385300710081341p3c52c8banbb58ea95dac2238a@xxxxxxxxxxxxxx>
References: <7a1385300710081341p3c52c8banbb58ea95dac2238a@xxxxxxxxxxxxxx>
Message-ID: <20071008135649.45c27e47@freepuppy.rosehill>

OMon, 8 Oc2007 22:41:23 +0200
"RoLee" <ronberlin@xxxxxxxxxxxxxx> wrote:

> Hello all,
> 
> I would likto usNetem to assign per-flow delay: all packets belonging
> to thsamflow (as identified IP addressing 5-tuple) get the same
> amounof delay bupackets from different flows will get different
> amounof delays. Further, thdelay assigned to a flow is randomly
> sampled froa given distribution.
> 
> This approach is possiblwith a modified version of dummynein
> FreeBSD (for examplin http://www.cs.unc.edu/~jeffay/papers/SIGCOMM-03.pdf
> and ihttp://netsrv.csc.ncsu.edu/export/impact_of_background_comp_net_2007.pdf)
> buidoesn't appear to be possible with the current version of Netem.
> 
> I think I camodify Neteto achieve this but since I am relatively new
> to Linux kernel programming. I would likto know whether thfollowing
> approach would bthright one:
> 
> - Creata dummy devicand use ioctl to pass data for the delay distribution
> frouser to kernel.
> - Is ipossiblto load/unload Netem as a kernel module (this would make
> thkernel developmeneasier since I wouldn't have to compile the kernel
> every timI makchanges to the code)?
> 

Onway to do this is to creata priority fifo qdisc with
all thpossibldelays you want.  There is a restriction of 15 different
values, buthais probably okay..  Then use the tc match logic to
assigtuple's to thdifferent queues.

I don'wanto build new classifier logic into netem, but if you can find
creativways to reusexisting infrastructure to different values that
would bcool. Something lika priority value to delay mapping table or
other ideas?
-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Froronberlin agooglemail.com  Mon Oct  8 14:16:52 2007
From: ronberliagooglemail.com (Ron Lee)
Date: MoOc 8 14:16:59 2007
Subject: Using Neteto assign per-flow delay
In-Reply-To: <20071008135649.45c27e47@freepuppy.rosehill>
References: <7a1385300710081341p3c52c8banbb58ea95dac2238a@xxxxxxxxxxxxxx>
	<20071008135649.45c27e47@freepuppy.rosehill>
Message-ID: <7a1385300710081416nf060e9eqbb996c622e699509@xxxxxxxxxxxxxx>

Hi Stephen,

I agretha15 different values are probably OK for most of the cases.
BuI'll probably need morthan 15 values in order to get a paper published
(thbar for publication is quithigh nowadays).

I acurrently thinking of doing this as follows. Usthe 5-tuple to compute
a hash valuthais then used as a lookup key to determine the random
delay for a flow. This specific mechaniswill only bused if a specific
sysctl flag is set. Otherwise, thdelay will bdetermined by the default
Netemechanism. Thchange to the code will be rather small but I am
nosurwhether you like this approach or not.

Thanks,
Ron

PS. Pleasnotthat I am not criticizing the way Netem is implemented
(I actually think thait's quitelegant). I am just looking for a way to get
my research don(and I know thathis is a rather specific requirement).
Buif there's interest, I would certainly contributthe code...

O10/8/07, Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Onway to do this is to creata priority fifo qdisc with
> all thpossibldelays you want.  There is a restriction of 15 different
> values, buthais probably okay..  Then use the tc match logic to
> assigtuple's to thdifferent queues.
>
> I don'wanto build new classifier logic into netem, but if you can find
> creativways to reusexisting infrastructure to different values that
> would bcool. Something lika priority value to delay mapping table or
> other ideas?
> --
> StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
>
Froshemminger alinux-foundation.org  Mon Oct  8 14:37:40 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: MoOc 8 14:39:16 2007
Subject: Using Neteto assign per-flow delay
In-Reply-To: <7a1385300710081416nf060e9eqbb996c622e699509@xxxxxxxxxxxxxx>
References: <7a1385300710081341p3c52c8banbb58ea95dac2238a@xxxxxxxxxxxxxx>
	<20071008135649.45c27e47@freepuppy.rosehill>
	<7a1385300710081416nf060e9eqbb996c622e699509@xxxxxxxxxxxxxx>
Message-ID: <20071008143740.57e6e746@freepuppy.rosehill>

OMon, 8 Oc2007 23:16:52 +0200
"RoLee" <ronberlin@xxxxxxxxxxxxxx> wrote:

> Hi Stephen,
> 
> I agretha15 different values are probably OK for most of the cases.
> BuI'll probably need morthan 15 values in order to get a paper published
> (thbar for publication is quithigh nowadays).

You carebuild prio and tools with TC_PRIO_MAX increased, bualso
iwould mean thathe priorities might cause flow anomalies.

> I acurrently thinking of doing this as follows. Usthe 5-tuple to compute
> a hash valuthais then used as a lookup key to determine the random
> delay for a flow. This specific mechaniswill only bused if a specific
> sysctl flag is set. Otherwise, thdelay will bdetermined by the default
> Netemechanism. Thchange to the code will be rather small but I am
> nosurwhether you like this approach or not.
> 

Skip thsysctl, jusadd another option to netem via netlink then.


-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
FroOsborne_Mike_D acat.com  Mon Oct 15 08:52:42 2007
From: Osborne_Mike_D acat.co(Mike D. Osborne)
Date: MoOc15 08:52:54 2007
Subject: NetEin conjunction with TBF produces wild latencies and
 Emulatioresults under load
In-Reply-To: <2dfd6a90710150850u2991950q8d749fe720fa65c@xxxxxxxxxxxxxx>
Message-ID: <OFC1E47DB1.7158B764-ON86257375.005729AE-86257375.0057391F@xxxxxxxxxxxxx>

Does anyonon this lisuse NetEm in conjunction with TBF to limit 
DataRatas well as Latency?

WheI do this therare some parameters for buffer and limit or latency 
thaI anot certain how to use properly.   As a result, when I limit to 
say 128 kbps, I setharesponse times are much longer than expected when 
I apply thTBF. 

Any help with using NetEin conjunction with TBF would bgreatly 
appreciated.   I reviewed thLinux Advanced Routing HOWTO, buit did not 
havmany examples.

Thank you
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20071015/e30f0269/attachment.htm
Frojuliokriger agmail.com  Tue Oct 16 05:21:11 2007
From: juliokriger agmail.co(Julio Kriger)
Date: TuOc16 05:21:18 2007
Subject: NetEin conjunction with TBF produces wild latencies and
	Emulatioresults under load
In-Reply-To: <OFC1E47DB1.7158B764-ON86257375.005729AE-86257375.0057391F@xxxxxxxxxxxxx>
References: <2dfd6a90710150850u2991950q8d749fe720fa65c@xxxxxxxxxxxxxx>
	<OFC1E47DB1.7158B764-ON86257375.005729AE-86257375.0057391F@xxxxxxxxxxxxx>
Message-ID: <682bc30a0710160521w5159a4ffkfabaf63b7c78a35c@xxxxxxxxxxxxxx>

Hi!
I used NetEwith TBF, something likthis:

tc qdisc add dev eth1 roohandl1:0 tbf rate 10mbit burst 1500 mtu 1500
limi500
tc qdisc add dev eth1 paren1:1 handl10: netem limit 500 delay 30ms 15ms
75% reorder 10%

You will noge"exacts" results, but fairly close enough.

Regards,
Julio


O10/15/07, MikD. Osborne <Osborne_Mike_D@xxxxxxx> wrote:
>
>
> Does anyonon this lisuse NetEm in conjunction with TBF to limit
> DataRatas well as Latency?
>
> WheI do this therare some parameters for buffer and limit or latency
> thaI anot certain how to use properly.   As a result, when I limit to
> say 128 kbps, I setharesponse times are much longer than expected whe=
I
> apply thTBF.
>
> Any help with using NetEin conjunction with TBF would bgreatly
> appreciated.   I reviewed thLinux Advanced Routing HOWTO, buit did not
> havmany examples.
>
> Thank you
> _______________________________________________
> Netemailing list
> Netem@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/netem
>



-- =

--
>Frothmoment I picked your book up until I laid it down, I was convulsed
with laughter. Someday I intend reading it.
Groucho Marx
----------------------------
Julio Kriger
mailto:juliokriger@xxxxxxxxx
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20071016=
/c4038395/attachment.htm
From.nambiar atcs.com  Wed Oct 17 10:36:33 2007
From: m.nambiar atcs.co(M Nambiar)
Date: Wed Oc17 10:35:58 2007
Subject: Problewith cascaded netequeues
Message-ID: <OFFFAAF1D7.D5982C73-ON65257377.005EBE6F-65257377.0060A015@xxxxxxx>

Hello,

I hava peculiar proble..... not sure if I am doing somthing wrong.

I ausing linux kernel 2.6.19

I seup neteon a host (192.168.140.148) with 20ms latency and 6% loss. 
Therar2 cases

---------------------------------------------------------------------------------------------------------------------------------------
CasI - Only onnetem qdisc
192.168.140.148_prompt>tc qdisc add dev eth0 roonetedelay 20ms loss 6 

Ping fromy Windows PC looks likthis 
C:\Documents and Settings\tcsuser>ping 192.168.140.148

Pinging 192.168.140.148 with 32 bytes of data:

Reply fro192.168.140.148: bytes=32 time=24ms TTL=64
Reply fro192.168.140.148: bytes=32 time=26ms TTL=64
Reply fro192.168.140.148: bytes=32 time=26ms TTL=64
Reply fro192.168.140.148: bytes=32 time=24ms TTL=64

Ping statistics for 192.168.140.148:
    Packets: Sen= 4, Received = 4, Los= 0 (0% loss),
Approximatround trip times in milli-seconds:
    Minimu= 24ms, Maximu= 26ms, Average = 25ms

---------------------------------------------------------------------------------------------------------------------------------------

CasII - Cascaded neteqdiscs
192.168.140.148_prompt>tc qdisc add dev eth0 roohandl1: netem delay 
20ms
192.168.140.148_prompt>tc qdisc add dev eth0 paren1:1 handl10: netem 
loss 6%

Now ping looks likthis
C:\Documents and Settings\tcsuser>ping 192.168.140.148

Pinging 192.168.140.148 with 32 bytes of data:

Reply fro192.168.140.148: bytes=32 time=2ms TTL=64
Reply fro192.168.140.148: bytes=32 time<1ms TTL=64
Reply fro192.168.140.148: bytes=32 time=3ms TTL=64
Reply fro192.168.140.148: bytes=32 time=2ms TTL=64

Ping statistics for 192.168.140.148:
    Packets: Sen= 4, Received = 4, Los= 0 (0% loss),
Approximatround trip times in milli-seconds:
    Minimu= 0ms, Maximu= 3ms, Average = 1ms
---------------------------------------------------------------------------------------------------------------------------------------

CasI is as expected.

BucasII does not  make sense. How is the latency effect in one netem 
qdisc nullified by loss ianother?

Questio- Is iwrong to use 2 netem qdiscs in series like this?

Manoj KarunakaraNambiar
Tata Consultancy Services
Cell:- 9833111377
Fax:- 67506855
Mailto: m.nambiar@xxxxxxx
Website: http://www.tcs.com
____________________________________________
Experienccertainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________
=====-----=====-----=====
Notice: Thinformation contained in this e-mail
messagand/or attachments to imay contain 
confidential or privileged information. If you ar
nothintended recipient, any dissemination, use, 
review, distribution, printing or copying of th
informatiocontained in this e-mail messag
and/or attachments to iarstrictly prohibited. If 
you havreceived this communication in error, 
pleasnotify us by reply e-mail or telephonand 
immediately and permanently deletthmessage 
and any attachments. Thank you


-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20071017/182b9f07/attachment.htm
Froshemminger alinux-foundation.org  Wed Oct 17 11:06:03 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: Wed Oc17 11:06:12 2007
Subject: Problewith cascaded netequeues
In-Reply-To: <OFFFAAF1D7.D5982C73-ON65257377.005EBE6F-65257377.0060A015@xxxxxxx>
References: <OFFFAAF1D7.D5982C73-ON65257377.005EBE6F-65257377.0060A015@xxxxxxx>
Message-ID: <20071017110603.3fef0928@freepuppy.rosehill>

OWed, 17 Oc2007 23:06:33 +0530
M Nambiar <m.nambiar@xxxxxxx> wrote:

> Hello,
> 
> I hava peculiar proble..... not sure if I am doing somthing wrong.
> 
> I ausing linux kernel 2.6.19
> 
> I seup neteon a host (192.168.140.148) with 20ms latency and 6% loss. 
> Therar2 cases
> 
> ---------------------------------------------------------------------------------------------------------------------------------------
> CasI - Only onnetem qdisc
> 192.168.140.148_prompt>tc qdisc add dev eth0 roonetedelay 20ms loss 6 
> 
> Ping fromy Windows PC looks likthis 
> C:\Documents and Settings\tcsuser>ping 192.168.140.148
> 
> Pinging 192.168.140.148 with 32 bytes of data:
> 
> Reply fro192.168.140.148: bytes=32 time=24ms TTL=64
> Reply fro192.168.140.148: bytes=32 time=26ms TTL=64
> Reply fro192.168.140.148: bytes=32 time=26ms TTL=64
> Reply fro192.168.140.148: bytes=32 time=24ms TTL=64
> 
> Ping statistics for 192.168.140.148:
>     Packets: Sen= 4, Received = 4, Los= 0 (0% loss),
> Approximatround trip times in milli-seconds:
>     Minimu= 24ms, Maximu= 26ms, Average = 25ms
> 
> ---------------------------------------------------------------------------------------------------------------------------------------
> 
> CasII - Cascaded neteqdiscs
> 192.168.140.148_prompt>tc qdisc add dev eth0 roohandl1: netem delay 
> 20ms
> 192.168.140.148_prompt>tc qdisc add dev eth0 paren1:1 handl10: netem 
> loss 6%
> 
> Now ping looks likthis
> C:\Documents and Settings\tcsuser>ping 192.168.140.148
> 
> Pinging 192.168.140.148 with 32 bytes of data:
> 
> Reply fro192.168.140.148: bytes=32 time=2ms TTL=64
> Reply fro192.168.140.148: bytes=32 time<1ms TTL=64
> Reply fro192.168.140.148: bytes=32 time=3ms TTL=64
> Reply fro192.168.140.148: bytes=32 time=2ms TTL=64
> 
> Ping statistics for 192.168.140.148:
>     Packets: Sen= 4, Received = 4, Los= 0 (0% loss),
> Approximatround trip times in milli-seconds:
>     Minimu= 0ms, Maximu= 3ms, Average = 1ms
> ---------------------------------------------------------------------------------------------------------------------------------------
> 
> CasI is as expected.
> 
> BucasII does not  make sense. How is the latency effect in one netem 
> qdisc nullified by loss ianother?
> 
> Questio- Is iwrong to use 2 netem qdiscs in series like this?
> 
> Manoj KarunakaraNambiar
> Tata Consultancy Services
> Cell:- 9833111377
> Fax:- 67506855
> Mailto: m.nambiar@xxxxxxx
> Website: http://www.tcs.com


Netewon'nest like that.
Neteworks by putting a timestamp on thpackets in the enqueue routine,
thechecking for thtimestamp on the dequeue. The nested netem will destroy
thtimestamp frothe earlier netem.

Theris no need to nesnetem, you can mix delay and loss with one instance.
For whayou ardoing use:
 tc qdisc add dev eth0 roohnetedelay 20ms loss 6%

-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Frohello.martin acomhem.se  Tue Oct 23 12:05:14 2007
From: hello.martiacomhem.se (Martin Andersson)
Date: TuOc23 12:05:35 2007
Subject: Jitter introduced by netem
Message-ID: <471E45EA.7060206@xxxxxxxxx>

Hello.


I hava question abouthe "jitter" that might be introduced by netem.

I havthfollowing setup.

<testUni1> ---- <L2Switch> ---- <Linux(bridge)> ---- <testUni2>

testUni1 send NTP messages and havresolution 2^-32 s.
testUni2 receives NTP messages and also marks thtime with resolution 
1e-8.

Lets now call this two timers for T3 and T4.

Sincthclock are independent we can't calculate with absolute time, 
so wlook athem in relative time.

If I ploT3 on x axis and T3-T4 on y axis, ishould be a straight line 
(if therwas no jitter in Unit1/2, or introduced on thway).


Now I havtwo scenarios with and withounetem.

Withounete(i.e only bridging in linux box).
I plotting thlinand also make an polyfit (in octave to match a line 
to x/y data).
Thediff thactuall data to this line, I assume this should give the 
"jitter" introduced ithsystem.
I looks quitok  thdata differ +/- 1e-6 seconds (see attached plot 
NoNetem.png).

With nete(a 1ms static delay on ethernecard towards testUnit 2 "tc 
qdisc add dev eth1 roonetedelay 1ms")
Now ilooks likthe data jitter with +/- 3ms (se attached plot 
Netem1msDelay.png).
If studying thx/y data ilooks like a sawtooth behavior on the delay 
introduced by netem.


This behaviour does ishow thbehvaiour of how the kernel ticks in 
linux, or is'something els(I'm using kernel 2.6.18.2).
Noticed othwiki the following.
"Ikernel versions, 2.6.22 or later, netewill use high resolution 
timers, if they arenabled.
This allows for finer granularity (sub-jiffie) resolution."

Will changing to 2.6.22 changthbehavior, or does it not correlate to 
my observation.

brg/Martin
Frohello.martin acomhem.se  Tue Oct 23 12:24:28 2007
From: hello.martiacomhem.se (Martin Andersson)
Date: TuOc23 12:24:38 2007
Subject: Jitter introduced by netem
In-Reply-To: <471E45EA.7060206@xxxxxxxxx>
References: <471E45EA.7060206@xxxxxxxxx>
Message-ID: <471E4A6C.4050402@xxxxxxxxx>

Sorry forgothattachments.

-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: NoNetem.png
Type: image/png
Size: 11825 bytes
Desc: noavailable
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/2007102=
3/8a8402fb/NoNetem-0001.png
-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: Netem1msDelay.png
Type: image/png
Size: 14442 bytes
Desc: noavailable
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/2007102=
3/8a8402fb/Netem1msDelay-0001.png
Froshemminger alinux-foundation.org  Tue Oct 23 12:39:28 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: TuOc23 12:40:14 2007
Subject: Jitter introduced by netem
In-Reply-To: <471E45EA.7060206@xxxxxxxxx>
References: <471E45EA.7060206@xxxxxxxxx>
Message-ID: <20071023123928.26d73182@freepuppy.rosehill>

OTue, 23 Oc2007 21:05:14 +0200
MartiAndersson <hello.martin@xxxxxxxxx> wrote:

> Hello.
> 
> 
> I hava question abouthe "jitter" that might be introduced by netem.
> 
> I havthfollowing setup.
> 
> <testUni1> ---- <L2Switch> ---- <Linux(bridge)> ---- <testUni2>
> 
> testUni1 send NTP messages and havresolution 2^-32 s.
> testUni2 receives NTP messages and also marks thtime with resolution 
> 1e-8.
> 
> Lets now call this two timers for T3 and T4.
> 
> Sincthclock are independent we can't calculate with absolute time, 
> so wlook athem in relative time.
> 
> If I ploT3 on x axis and T3-T4 on y axis, ishould be a straight line 
> (if therwas no jitter in Unit1/2, or introduced on thway).
> 
> 
> Now I havtwo scenarios with and withounetem.
> 
> Withounete(i.e only bridging in linux box).
> I plotting thlinand also make an polyfit (in octave to match a line 
> to x/y data).
> Thediff thactuall data to this line, I assume this should give the 
> "jitter" introduced ithsystem.
> I looks quitok  thdata differ +/- 1e-6 seconds (see attached plot 
> NoNetem.png).
> 
> With nete(a 1ms static delay on ethernecard towards testUnit 2 "tc 
> qdisc add dev eth1 roonetedelay 1ms")
> Now ilooks likthe data jitter with +/- 3ms (se attached plot 
> Netem1msDelay.png).
> If studying thx/y data ilooks like a sawtooth behavior on the delay 
> introduced by netem.
> 
> 
> This behaviour does ishow thbehvaiour of how the kernel ticks in 
> linux, or is'something els(I'm using kernel 2.6.18.2).
> Noticed othwiki the following.
> "Ikernel versions, 2.6.22 or later, netewill use high resolution 
> timers, if they arenabled.
> This allows for finer granularity (sub-jiffie) resolution."
> 
> Will changing to 2.6.22 changthbehavior, or does it not correlate to 
> my observation.
> 
> brg/Martin
> _______________________________________________
> Netemailing list
> Netem@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/netem

With 2.6.18 imatters whaHZ value you choose during kernel config
and which clock sourcis used for psched.

Later kernels usth"best available" real time clock source and
ktime_t.



-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Fropetar.forai agmx.at  Tue Oct 23 13:43:44 2007
From: petar.forai agmx.a(Petar Forai)
Date: TuOc23 13:44:21 2007
Subject: per packerealtiminterface
Message-ID: <200710232243.44653.petar.forai@xxxxxx>

Hey guys!

I was wondering if iwould bfeasable and if it's a feature that maybe other 
ppl would als bin need of and I'd likto ask this ML for futher info on 
that.

Would ibpossible to implement an interface via the standard tc/netem 
facilities to suppora realtime/onliniface which supports a per packet 
decisioon a packet's discarding/delay/jitter/BER etc. i.e. imagina system 
whera userland app (in my casa UMTS/UTRAN emulator) tells netem what 
should happewith thnext incomming or outgoing packet (delayed, 
discarded, ...)

How your opinioon thamatter?

regards, 

P  
Froshemminger alinux-foundation.org  Tue Oct 23 14:38:34 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: TuOc23 14:38:50 2007
Subject: per packerealtiminterface
In-Reply-To: <200710232243.44653.petar.forai@xxxxxx>
References: <200710232243.44653.petar.forai@xxxxxx>
Message-ID: <20071023143834.63d4c3c2@freepuppy.rosehill>

OTue, 23 Oc2007 22:43:44 +0200
Petar Forai <petar.forai@xxxxxx> wrote:

> Hey guys!
> 
> I was wondering if iwould bfeasable and if it's a feature that maybe other 
> ppl would als bin need of and I'd likto ask this ML for futher info on 
> that.
> 
> Would ibpossible to implement an interface via the standard tc/netem 
> facilities to suppora realtime/onliniface which supports a per packet 
> decisioon a packet's discarding/delay/jitter/BER etc. i.e. imagina system 
> whera userland app (in my casa UMTS/UTRAN emulator) tells netem what 
> should happewith thnext incomming or outgoing packet (delayed, 
> discarded, ...)
> 
> How your opinioon thamatter?
> 

Thdevil is in thdetails.

Therwas a patch to allow per-packeactions based on a trace file,
buthinterface was awkward and had lots of corner case decisions (like
whato do when packearrives but no trace information etc). Also how
to transfer largvolumes of configuration data down to netewas a real
problem: using /proc doesn'work well, and netlink has issues with holding
rtnl_lock too long.

I tried fixing iup, bueventually gave up as it seemed too complex
to easily gecleaned up and bsupportable in the long term.  I am open
to a better solution, buthcode needs to work and not have maintenance
issues.

-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Frohello.martin acomhem.se  Wed Oct 24 14:42:56 2007
From: hello.martiacomhem.se (Martin Andersson)
Date: Wed Oc24 14:43:07 2007
Subject: Jitter introduced by netem
In-Reply-To: <20071023123928.26d73182@freepuppy.rosehill>
References: <471E45EA.7060206@xxxxxxxxx>
	<20071023123928.26d73182@freepuppy.rosehill>
Message-ID: <471FBC60.7030602@xxxxxxxxx>

StepheHemminger wrote:
> With 2.6.18 imatters whaHZ value you choose during kernel config
> and which clock sourcis used for psched.
>
> Later kernels usth"best available" real time clock source and
> ktime_t.
>
>   =

I havnow updated to 2.6.22-9 kernel.
And still theris lots of jitter introduced by netem.
For a 1ms delay, therseems to b+/- 2ms jitter.

Is this becaushow netetimestamps the packets, so it's send out at =

som1ms ticks?
Or maybmy kernel doesn'have this ktime_t (how to figure out if it has)

PS. Correctioto my firse-mail, I said it was bridging in the linux =

machine, it's actually ip_forwarding DS.


-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: 2.6.22.png
Type: image/png
Size: 15527 bytes
Desc: noavailable
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/2007102=
4/e2e65036/2.6.22.png
Frolucas alucas-nussbaum.net  Wed Oct 24 15:00:35 2007
From: lucas alucas-nussbaum.ne(Lucas Nussbaum)
Date: Wed Oc24 15:06:59 2007
Subject: Jitter introduced by netem
In-Reply-To: <471FBC60.7030602@xxxxxxxxx>
References: <471E45EA.7060206@xxxxxxxxx>
	<20071023123928.26d73182@freepuppy.rosehill>
	<471FBC60.7030602@xxxxxxxxx>
Message-ID: <20071024220035.GA27043@xxxxxxxxxxxxxxxx>

O24/10/07 a23:42 +0200, Martin Andersson wrote:
> StepheHemminger wrote:
>> With 2.6.18 imatters whaHZ value you choose during kernel config
>> and which clock sourcis used for psched.
>>
>> Later kernels usth"best available" real time clock source and
>> ktime_t.
>>
>>   
> I havnow updated to 2.6.22-9 kernel.
> And still theris lots of jitter introduced by netem.
> For a 1ms delay, therseems to b+/- 2ms jitter.
>
> Is this becaushow netetimestamps the packets, so it's send out at some 
> 1ms ticks?
> Or maybmy kernel doesn'have this ktime_t (how to figure out if it has)
>
> PS. Correctioto my firse-mail, I said it was bridging in the linux 
> machine, it's actually ip_forwarding DS.

Owhich architecturare you running ?
-- 
| Lucas Nussbaum
| lucas@lucas-nussbaum.n http://www.lucas-nussbaum.net/ |
| jabber: lucas@xxxxxxxxxxx             GPG: 1024D/023B3F4F |
Frohello.martin acomhem.se  Wed Oct 24 15:17:53 2007
From: hello.martiacomhem.se (Martin Andersson)
Date: Wed Oc24 15:18:27 2007
Subject: Jitter introduced by netem
In-Reply-To: <20071024220035.GA27043@xxxxxxxxxxxxxxxx>
References: <471E45EA.7060206@xxxxxxxxx>
	<20071023123928.26d73182@freepuppy.rosehill>
	<471FBC60.7030602@xxxxxxxxx>
	<20071024220035.GA27043@xxxxxxxxxxxxxxxx>
Message-ID: <471FC491.9050308@xxxxxxxxx>

Lucas Nussbauwrote:
>
> Owhich architecturare you running ?
>   
This is a HP with PentiuP4, two D-link DGE-530T



Linux epcil-0532 2.6.22.9-0.4-defaul#1 SMP 2007/10/05 21:32:04 UTC 
i686 i686 i386 GNU/Linux



!modin
modinfo sk98lin
filename:       
/lib/modules/2.6.22.9-0.4-default/kernel/drivers/net/sk98lin/sk98lin.ko
license:        GPL
description:    SysKonnecSK-NET GigabiEthernet SK-98xx driver
author:         Mirko Lindner <mlindner@xxxxxxxxxxxxx>
srcversion:     D04D21B6F2AA0BF249248F1
alias:          pci:v00001737d00001064sv*sd*bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000015bc*sc*i*
alias:          pci:v00001371d0000434Esv*sd*bc*sc*i*
alias:          pci:v000011ABd00005005sv*sd*bc*sc*i*
alias:          pci:v000011ABd00004320sv*sd*bc*sc*i*
alias:          pci:v00001148d00004320sv*sd*bc*sc*i*
alias:          pci:v00001148d00004300sv*sd*bc*sc*i*
alias:          pci:v000010B7d000080EBsv*sd*bc*sc*i*
alias:          pci:v000010B7d00001700sv*sd*bc*sc*i*
depends:
supported:      yes
vermagic:       2.6.22.9-0.4-defaulSMP mod_unload 586
parm:           Speed_A:array of charp
parm:           Speed_B:array of charp
parm:           AutoNeg_A:array of charp
parm:           AutoNeg_B:array of charp
parm:           DupCap_A:array of charp
parm:           DupCap_B:array of charp
parm:           FlowCtrl_A:array of charp
parm:           FlowCtrl_B:array of charp
parm:           Role_A:array of charp
parm:           Role_B:array of charp
parm:           ConType:array of charp
parm:           PrefPort:array of charp
parm:           RlmtMode:array of charp
parm:           IntsPerSec:array of int
parm:           Moderation:array of charp
parm:           Stats:array of charp
parm:           ModerationMask:array of charp
parm:           AutoSizing:array of charp



ca/proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model na    : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping        : 3
cpu MHz         : 2800.000
cachsiz     : 2048 KB
physical id     : 0
siblings        : 2
corid         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exceptio  : yes
cpuid level     : 5
wp              : yes
flags           : fpu vmdpse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov papse36 clflush dts acpi mmx fxsr sssse2 ss ht tm pbe nx lm 
constant_tsc pni monitor ds_cpl escid cx16 xtpr
bogomips        : 6390.00
clflush siz   : 64

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model na    : Intel(R) Pentium(R) 4 CPU 3.20GHz
stepping        : 3
cpu MHz         : 2800.000
cachsiz     : 2048 KB
physical id     : 0
siblings        : 2
corid         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exceptio  : yes
cpuid level     : 5
wp              : yes
flags           : fpu vmdpse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov papse36 clflush dts acpi mmx fxsr sssse2 ss ht tm pbe nx lm 
constant_tsc pni monitor ds_cpl escid cx16 xtpr
bogomips        : 6384.46
clflush siz   : 64

Frohello.martin acomhem.se  Wed Oct 24 16:23:14 2007
From: hello.martiacomhem.se (Martin Andersson)
Date: Wed Oc24 16:23:24 2007
Subject: Jitter introduced by netem
In-Reply-To: <471FC491.9050308@xxxxxxxxx>
References: <471E45EA.7060206@xxxxxxxxx>	<20071023123928.26d73182@freepuppy.rosehill>	<471FBC60.7030602@xxxxxxxxx>	<20071024220035.GA27043@xxxxxxxxxxxxxxxx>
	<471FC491.9050308@xxxxxxxxx>
Message-ID: <471FD3E2.9010305@xxxxxxxxx>

Another graph :-)

If I plothgraph T3,(T4-T3) I get a graph that show a sawtooth behaviour.
Iseems liknetem "compensate" every ~22 pakets (or it might be every =

~220ms).
Is iso thathe delay that is introduced for every packet has some =

distributiofor thdelay.
I also attach thraw data.


-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: T3vsT4.delay.png
Type: image/png
Size: 27251 bytes
Desc: noavailable
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/2007102=
5/5d83e9fc/T3vsT4.delay-0001.png
-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: timeMeas.gz
Type: application/x-gzip
Size: 35593 bytes
Desc: noavailable
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/2007102=
5/5d83e9fc/timeMeas-0001.bin
Frolucas alucas-nussbaum.net  Wed Oct 24 22:37:33 2007
From: lucas alucas-nussbaum.ne(Lucas Nussbaum)
Date: Wed Oc24 22:44:46 2007
Subject: Jitter introduced by netem
In-Reply-To: <471FD3E2.9010305@xxxxxxxxx>
References: <471E45EA.7060206@xxxxxxxxx>
	<20071023123928.26d73182@freepuppy.rosehill>
	<471FBC60.7030602@xxxxxxxxx>
	<20071024220035.GA27043@xxxxxxxxxxxxxxxx>
	<471FC491.9050308@xxxxxxxxx> <471FD3E2.9010305@xxxxxxxxx>
Message-ID: <20071025053733.GA7795@xxxxxxxxxxxxxxxx>

O25/10/07 a01:23 +0200, Martin Andersson wrote:
> Another graph :-)
>
> If I plothgraph T3,(T4-T3) I get a graph that show a sawtooth 
> behaviour.
> Iseems liknetem "compensate" every ~22 pakets (or it might be every 
> ~220ms).
> Is iso thathe delay that is introduced for every packet has some 
> distributiofor thdelay.
> I also attach thraw data.

Cayou check in /boot/config if CONFIG_HIGH_RES_TIMERS is enabled?
-- 
| Lucas Nussbaum
| lucas@lucas-nussbaum.n http://www.lucas-nussbaum.net/ |
| jabber: lucas@xxxxxxxxxxx             GPG: 1024D/023B3F4F |
Frohello.martin acomhem.se  Thu Oct 25 01:34:17 2007
From: hello.martiacomhem.se (hello.martin@xxxxxxxxx)
Date: Thu Oc25 01:34:24 2007
Subject: Ang: Re: Jitter introduced by netem
Message-ID: <398836.6631193301257328.JavaMail.defaultUser@defaultHost>



>----Ursprungligmeddelande----
>Fr?n: lucas@xxxxxxxxxxxxxxxxxx
>Datum: 25-10-2007 07:37
>Till: "MartiAndersson"<hello.martin@xxxxxxxxx>
>Kopia: <netem@xxxxxxxxxxxxxxxxxxxxxxxxxx>
>?rende: Re: Jitter introduced by netem
>
>O25/10/07 a01:23 +0200, Martin Andersson wrote:
>> Another graph :-)
>>
>> If I plothgraph T3,(T4-T3) I get a graph that show a 
sawtooth 
>> behaviour.
>> Iseems liknetem "compensate" every ~22 pakets (or it 
mighbevery 
>> ~220ms).
>> Is iso thathe delay that is introduced for every packet 
has som
>> distributiofor thdelay.
>> I also attach thraw data.
>
>Cayou check in /boot/config if CONFIG_HIGH_RES_TIMERS is 
enabled?


I found "/boot/config-2.6.22.9-0.4-default" and isays.
And ilooks likit's not enabled, I will change it to se 
whats happening.

>Frothfile.
#
# Processor typand features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
# CONFIG_HIGH_RES_TIMERS is noset
CONFIG_SMP=y


Frohello.martin acomhem.se  Thu Oct 25 12:01:38 2007
From: hello.martiacomhem.se (Martin Andersson)
Date: Thu Oc25 12:01:52 2007
Subject: Jitter introduced by netem
In-Reply-To: <20071025053733.GA7795@xxxxxxxxxxxxxxxx>
References: <471E45EA.7060206@xxxxxxxxx>
	<20071023123928.26d73182@freepuppy.rosehill>
	<471FBC60.7030602@xxxxxxxxx>
	<20071024220035.GA27043@xxxxxxxxxxxxxxxx>
	<471FC491.9050308@xxxxxxxxx> <471FD3E2.9010305@xxxxxxxxx>
	<20071025053733.GA7795@xxxxxxxxxxxxxxxx>
Message-ID: <4720E812.50306@xxxxxxxxx>

Lucas Nussbauwrote:
> Cayou check in /boot/config if CONFIG_HIGH_RES_TIMERS is enabled?
>   =


I rebuild my opensuse10.3 kernel with CONFIG_HIGH_RES_TIMERS=3Dy

And now iwork as a much much better.
Many thanks.

/Martin

PS Attached thnew histograas proof :-) DS.
-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: HighRes.png
Type: image/png
Size: 15700 bytes
Desc: noavailable
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/2007102=
5/a9addc32/HighRes.png
Froandreoli asamba.ing.unimo.it  Fri Oct 19 06:25:49 2007
From: andreoli asamba.ing.unimo.i(andreoli@xxxxxxxxxxxxxxxxxx)
Date: Fri Oc26 13:53:24 2007
Subject: tbf, multiplinterfaces, defaulroute
Message-ID: <34787.151.80.4.15.1192800349.squirrel@xxxxxxxxxxxxxxxxxxx>

Hi folks,

I'trying to seup TBF-based traffic shaping between two hosts. I used
this command (found othtbf man page):
tc qdisc add dev eth0 rootbf rat0.5mbit burst 5kb latency 70ms
peakrat1mbiminburst 1540
This command works nicely if I usa non-default-routinterface (in my
example, eth0). As sooas I usthe default-route interface (in my
example, eth1), traffic shaping does nowork anymore. A biof
investigatioreveals thathe traffic-shaped interface is dropping any
packets.
Any ideas? Is therany way to debug this issue? I couldn'spot any
solutioto this in tharchives. Both machines run Debian Etch (linux
kernel versio2.6.18-5-686, iproutversion  20061002-3).
FYI, any of these:
- removing thdefaulroute
- using a morrecenversion of the linux kernel (2.6.22.10)
- using thlatesversion of the iproute package (iproute2-2.6.22-070710)
did nohelp.
PleasCC msince I'm not subscribed to the list.

Thanks iadvance
Mauro Andreolini


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux