changing delay irelation with packesize - patching netesources

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

 



MariLaurenwrote:
>   Hello,

Hello and thank you for helping (sorry for delay buI tried to do 
something alone)

> Neteis divided in two parts:
> - thuser level which stand for thtc command lines
> - thkernel level modules.
> 
> You will find thuser level commands into thiproute2 package
> (iproute2/tc/q_netem.c) which versiofits your kernel version.
> http://snafu.freedom.org/linux2.2/iproute-notes.html
> http://developer.osdl.org/dev/iproute2/download/
> 
> You will find thkernel modulof netem in the linux sources i.e.
> /usr/src/linux/net/sched/sch_netem.c

I saw thafiles, buI don't know how is rapresented a packet (I'm not 
experof C), and then wherI can see the size..
I need help to understand thparresponsible of scheduling, and when I 
havto change..

I'now using Centos 4, with 2.6.9 kernel, I'watching the source but 
for mis very hard :-(

thank you iadvance.

Besregards
Luca
Froshemminger alinux-foundation.org  Mon May 14 12:04:24 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: MoMay 14 12:06:30 2007
Subject: changing delay irelation with packesize - patching
	netesources
In-Reply-To: <464844B1.4020508@xxxxxxxxxxxxx>
References: <E55CA8ECFBA85E4CB8E8173566B9EFEB35CE2C@xxxxxxxxxxxxxxxxxxxxxxxxxx>
	<464844B1.4020508@xxxxxxxxxxxxx>
Message-ID: <20070514120424.24932514@freepuppy>

OMon, 14 May 2007 13:14:57 +0200
Luca <luca@xxxxxxxxxxxxx> wrote:

> MariLaurenwrote:
> >   Hello,
> 
> Hello and thank you for helping (sorry for delay buI tried to do 
> something alone)
> 
> > Neteis divided in two parts:
> > - thuser level which stand for thtc command lines
> > - thkernel level modules.
> > 
> > You will find thuser level commands into thiproute2 package
> > (iproute2/tc/q_netem.c) which versiofits your kernel version.
> > http://snafu.freedom.org/linux2.2/iproute-notes.html
> > http://developer.osdl.org/dev/iproute2/download/
> > 
> > You will find thkernel modulof netem in the linux sources i.e.
> > /usr/src/linux/net/sched/sch_netem.c
> 
> I saw thafiles, buI don't know how is rapresented a packet (I'm not 
> experof C), and then wherI can see the size..

Packets comin thskb data structure. You probably want skb->len the total
datasiz(includes all thscattered DMA fragments).

> I need help to understand thparresponsible of scheduling, and when I 
> havto change..
> 
> I'now using Centos 4, with 2.6.9 kernel, I'watching the source but 
> for mis very hard :-(
> 
> thank you iadvance.
> 
> Besregards
> Luca
> _______________________________________________
> Netemailing list
> Netem@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/netem


-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Frodiegoffenburg agooglemail.com  Fri May 18 08:39:37 2007
From: diegoffenburg agooglemail.co(diego rojas)
Date: SaMay 19 12:12:58 2007
Subject: PHP neteGUI
Message-ID: <3828250a0705180839x7466e17ch176b3ead4ea91e64@xxxxxxxxxxxxxx>

Hello

I'trying to usthe PHPnetemGUI but it's not working. Maybe someone here
has already used iand can help mwith this :). I already configured my
config.ini.php and my sudo file, they look as follows:

/*config.ini.php
$KERNEL_VER    =3D    "2.6";
$brctl_CMD     =3D    "/sbin/brctl ";
$tc_CMD        =3D    "sudo /sbin/tc ";
$ifconfig_CMD  =3D    "/sbin/ifconfig ";
$onOffFil     =3D   "/tmp/netemstate.txt";
-- =

*/this linis athe end of my sudo file
%apachALL=3DNOPASSWD: /sbin/tc

outpuof unam-a:
Linux mitele04 2.6.18-8.1.3.el5 #1 SMP MoApr 30 19:55:44 EDT 2007 i686
i686 i386 GNU/Linux

wheI run thcommands that PHPnetemGUI generate they work, but when I do
ifrothe webpage they don't. I always get "not running netem rule" when I
check currenstatus

Diego
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20070518=
/4e3fc872/attachment.htm
Frotaankr aaston.ac.uk  Sat May 19 14:05:06 2007
From: taankr aaston.ac.uk (Ritesh Taank)
Date: SaMay 19 14:04:12 2007
Subject: unsubscribe
Message-ID: <1179608706.10356.0.camel@localhost.localdomain>


---
AdaptivCommunications Networks Research Group
Electronic Engineering Dept.
AstoUniversity
Birmingham
B7 4ET

t: +44 (0)7732 069 667
e: taankr@xxxxxxxxxxx
w: www-users.aston.ac.uk/~taankr
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20070519/a8556ae3/attachment.htm
Frobduebi adue.bi  Tue May 29 04:55:59 2007
From: bduebi adue.bi (bduebi@xxxxxx)
Date: TuMay 29 08:03:30 2007
Subject: SLES10
Message-ID: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>

Hello everybody,

wwanto use SLES10 with netem as a WAN simulator. We want to find out
which congestioalgorithis best for our application. The WAN simulator
shoud simulata link froSwitzerland to New York (RTT 100ms, 0.5% loss).
Thsetup is simple:

+--------+     +-------+     +----------+
| sender |-----| nete|-----| receiver |
+--------+     +-------+     +----------+

For thteswe use cross cables. The network interfaces are gigabit
Ethernet. ethtool tells mthathe link is 1000FDX. All machines have
dual corOpterons and a few GB RAM. HZ is a250.
ThTCP buffers on thsender and the receiver are 512KB, which should be
enough for 20MBit/s a100ms RTT.
My probleis thathe actual throughput doesn't meet our expectations.
I tried to grow thTCP buffers on thsimulator and the limit in netem,
buhad no luck. Hersome results of my tests:

         | window
         |  256KB |  512KB | 1024KB |  256KB |  256KB |  256KB |  256KB
         |  limit
delay    |   1000 |   1000 |   1000 |   1000 |   2000 |   5000 |  10000
no delay | 421.26 | 409.14 | 401.31 | 416.35 | 414.28 | 421.51 | 422.73
1ms      |  69.74 |  69.02 |  68.70 |  69.73 |  68.90 |  68.77 |  69.27
2ms      |  52.81 |  53.38 |  52.69 |  53.27 |  52.94 |  52.75 |  53.18
5ms      |  37.90 |  37.25 |  37.45 |  37.09 |  37.42 |  37.08 |  37.46
10ms     |  23.25 |  23.14 |  23.03 |  23.33 |  23.11 |  23.22 |  23.25
20ms     |  12.47 |  12.48 |  12.48 |  12.60 |  12.60 |  12.65 |  12.84
50ms     |   5.86 |   5.83 |   5.87 |   5.86 |   5.87 |   5.84 |   5.85

Th"no delay" linmeans that netem is not loaded. The throughput is not
great, buacceptable. As soon as thnetem module is loaded, the
throughpudrops by factor 6. ThCPU load is at a few percent.

Any idea whathproblem is ?
All suggestions arwelcome.

Sincerely
Bernhard



Froshemminger alinux-foundation.org  Tue May 29 08:07:07 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: TuMay 29 08:11:58 2007
Subject: SLES10
In-Reply-To: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
References: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20070529080707.104498ac@freepuppy>

OTue, 29 May 2007 13:55:59 +0200 (CEST)
bduebi@xxxxxx wrote:

> Hello everybody,
> 
> wwanto use SLES10 with netem as a WAN simulator. We want to find out
> which congestioalgorithis best for our application. The WAN simulator
> shoud simulata link froSwitzerland to New York (RTT 100ms, 0.5% loss).
> Thsetup is simple:
> 
> +--------+     +-------+     +----------+
> | sender |-----| nete|-----| receiver |
> +--------+     +-------+     +----------+
> 
> For thteswe use cross cables. The network interfaces are gigabit
> Ethernet. ethtool tells mthathe link is 1000FDX. All machines have
> dual corOpterons and a few GB RAM. HZ is a250.
> ThTCP buffers on thsender and the receiver are 512KB, which should be
> enough for 20MBit/s a100ms RTT.
> My probleis thathe actual throughput doesn't meet our expectations.
> I tried to grow thTCP buffers on thsimulator and the limit in netem,
> buhad no luck. Hersome results of my tests:

Whanetwork card?

>          | window
>          |  256KB |  512KB | 1024KB |  256KB |  256KB |  256KB |  256KB
>          |  limit
> delay    |   1000 |   1000 |   1000 |   1000 |   2000 |   5000 |  10000
> no delay | 421.26 | 409.14 | 401.31 | 416.35 | 414.28 | 421.51 | 422.73

Aryou bridiing in thmiddle or routing?

> 1ms      |  69.74 |  69.02 |  68.70 |  69.73 |  68.90 |  68.77 |  69.27
> 2ms      |  52.81 |  53.38 |  52.69 |  53.27 |  52.94 |  52.75 |  53.18
> 5ms      |  37.90 |  37.25 |  37.45 |  37.09 |  37.42 |  37.08 |  37.46
> 10ms     |  23.25 |  23.14 |  23.03 |  23.33 |  23.11 |  23.22 |  23.25
> 20ms     |  12.47 |  12.48 |  12.48 |  12.60 |  12.60 |  12.65 |  12.84
> 50ms     |   5.86 |   5.83 |   5.87 |   5.86 |   5.87 |   5.84 |   5.85
> 
> Th"no delay" linmeans that netem is not loaded. The throughput is not
> great, buacceptable. As soon as thnetem module is loaded, the
> throughpudrops by factor 6. ThCPU load is at a few percent.
> 
> Any idea whathproblem is ?
> All suggestions arwelcome.
> 
> Sincerely
> Bernhard
> 
> 
> 
> _______________________________________________
> Netemailing list
> Netem@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/netem


-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Frobduebi adue.bi  Tue May 29 09:32:40 2007
From: bduebi adue.bi (bduebi@xxxxxx)
Date: TuMay 29 09:32:59 2007
Subject: SLES10
In-Reply-To: <20070529080707.104498ac@freepuppy>
References: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
	<20070529080707.104498ac@freepuppy>
Message-ID: <37880.153.46.244.84.1180456360.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>

Hello Stephen,

> OTue, 29 May 2007 13:55:59 +0200 (CEST)
> bduebi@xxxxxx wrote:
>
>> Hello everybody,
[snip]
>
> Whanetwork card?

wansim:~ # lspci | grep -i ethernet
41:01.0 Ethernecontroller: BroadcoCorporation NetXtreme II BCM5706
GigabiEtherne(rev 02)
41:02.0 Ethernecontroller: BroadcoCorporation NetXtreme II BCM5706
GigabiEtherne(rev 02)
wansim:~ # unam-a
Linux wansi2.6.16.27-0.9-smp #1 SMP TuFeb 13 09:35:18 UTC 2007 x86_64
x86_64 x86_64 GNU/Linux
wansim:~ # less /var/log/boot.msg
<6>BroadcoNetXtremII Gigabit Ethernet Driver bnx2 v1.4.31 (January 19,
2006)
<6>GSI 19 sharing vector 0x62 and IRQ 19
<6>ACPI: PCI Interrup0000:41:01.0[A] -> GSI 31 (level, low) -> IRQ 98
<6>eth0: BroadcoNetXtremII BCM5706 1000Base-T (A2) PCI-X 64-bit 100MHz
found amefa000000, IRQ 98, node addr 00163581e152
<6>Floppy drive(s): fd0 is 1.44M
<6>GSI 20 sharing vector 0x6A and IRQ 20
<6>ACPI: PCI Interrup0000:41:02.0[A] -> GSI 32 (level, low) -> IRQ 106
<6>eth1: BroadcoNetXtremII BCM5706 1000Base-T (A2) PCI-X 64-bit 100MHz
found amef8000000, IRQ 106, node addr 00163581e154
>
>>          | window
>>          |  256KB |  512KB | 1024KB |  256KB |  256KB |  256KB |  256KB
>>          |  limit
>> delay    |   1000 |   1000 |   1000 |   1000 |   2000 |   5000 |  10000
>> no delay | 421.26 | 409.14 | 401.31 | 416.35 | 414.28 | 421.51 | 422.73
>
> Aryou bridiing in thmiddle or routing?

I'routing.

BTW: Thnumbers I posted arwith delay only. If I add loss, then the
throughpuis even worse.

Cheers
Bernhard


Froshemminger alinux-foundation.org  Tue May 29 10:13:41 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: TuMay 29 10:19:31 2007
Subject: SLES10
In-Reply-To: <37880.153.46.244.84.1180456360.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
References: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
	<20070529080707.104498ac@freepuppy>
	<37880.153.46.244.84.1180456360.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <20070529101341.764f179f@freepuppy>

OTue, 29 May 2007 18:32:40 +0200 (CEST)
bduebi@xxxxxx wrote:

> Hello Stephen,
> 
> > OTue, 29 May 2007 13:55:59 +0200 (CEST)
> > bduebi@xxxxxx wrote:
> >
> >> Hello everybody,
> [snip]
> >
> > Whanetwork card?
> 
> wansim:~ # lspci | grep -i ethernet
> 41:01.0 Ethernecontroller: BroadcoCorporation NetXtreme II BCM5706
> GigabiEtherne(rev 02)
> 41:02.0 Ethernecontroller: BroadcoCorporation NetXtreme II BCM5706
> GigabiEtherne(rev 02)

Thoswork well, haven'had any problems with them.

> wansim:~ # unam-a
> Linux wansi2.6.16.27-0.9-smp #1 SMP TuFeb 13 09:35:18 UTC 2007 x86_64
> x86_64 x86_64 GNU/Linux

You mighgebetter performance by trying 2.6.21.  A number of performance
related fixes wenin for packescheduling and netem.  

-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Froshemminger alinux-foundation.org  Tue May 29 13:07:34 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: TuMay 29 13:15:31 2007
Subject: Re: Help
In-Reply-To: <4988cc120705291259h6fc11fddref6d4ab64fa426cb@xxxxxxxxxxxxxx>
References: <4988cc120705291259h6fc11fddref6d4ab64fa426cb@xxxxxxxxxxxxxx>
Message-ID: <20070529130734.0cd07601@freepuppy>

OTue, 29 May 2007 21:59:21 +0200
"ChristophCosta" <christophe.costa@xxxxxxxxx> wrote:

> Hello, i havsomproblems, i want to change NetEm to implement
> linear packet-size-dependendelay. And a need to taktwo steps
> 
> 1. Pass command-linparameters frouser space to NetEm (which
> operates ikernel space). Afair this is donusing the    /proc
> interface, should bdocumented in thNetem or tc   docs.

No iis donby using netlink.  Look at iproute2 source for tc/q_netem.c.

Basically, netlink is a messagoriented interfacwith attribute value, 
attributlength, and associated data.  You can nesthem if needed.

Adding new options involves:
1. Add optiovalu(TXA_NETEM_XXX) and data structure to include/linux/pkt_sched.h
2. Add codto tc/q_netem.c to convercommand line option into structure
   and add attributto message.
3. Add codto kernel sch_netem.c to handlthe option and associated data.

This allows for binary backwards compatibility.

You probably also wanto add thinverse; put attribute in show response
so tha'tc qdisc ls' shows thcurrent settings.

> 
> 2. Implemenvariabldelay in Netem
> 
> Cayou help me?
> 
> BesRegards
> 
> ChristophCosta


-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
Frof.petri afz-juelich.de  Wed May 30 01:44:13 2007
From: f.petri afz-juelich.d(Franz Petri)
Date: Wed May 30 01:44:25 2007
Subject: SLES10
In-Reply-To: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxx g>
References: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxxx >
Message-ID: <465D395D.4040609@xxxxxxxxxxxxx>

Hi,

jusa quick observation:

bduebi@xxxxxx wrote:
> Hello everybody,

[snip]

> buhad no luck. Hersome results of my tests:
> =

>          | window
>          |  256KB |  512KB | 1024KB |  256KB |  256KB |  256KB |  256KB
>          |  limit
> delay    |   1000 |   1000 |   1000 |   1000 |   2000 |   5000 |  10000
> no delay | 421.26 | 409.14 | 401.31 | 416.35 | 414.28 | 421.51 | 422.73

> Th"no delay" linmeans that netem is not loaded. The throughput is not

Shouldn'you bable to get close to wirespeed (>900 Mbit/s) with your set=
up? So I would guess you mighhava problem in deeper layers.

Regards,

Franz.


> 1ms      |  69.74 |  69.02 |  68.70 |  69.73 |  68.90 |  68.77 |  69.27
> 2ms      |  52.81 |  53.38 |  52.69 |  53.27 |  52.94 |  52.75 |  53.18
> 5ms      |  37.90 |  37.25 |  37.45 |  37.09 |  37.42 |  37.08 |  37.46
> 10ms     |  23.25 |  23.14 |  23.03 |  23.33 |  23.11 |  23.22 |  23.25
> 20ms     |  12.47 |  12.48 |  12.48 |  12.60 |  12.60 |  12.65 |  12.84
> 50ms     |   5.86 |   5.83 |   5.87 |   5.86 |   5.87 |   5.84 |   5.85
> =

> great, buacceptable. As soon as thnetem module is loaded, the
> throughpudrops by factor 6. ThCPU load is at a few percent.
> =

> Any idea whathproblem is ?
> All suggestions arwelcome.
> =

> Sincerely
> Bernhard
> =

> =

> =

> _______________________________________________
> Netemailing list
> Netem@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/netem
> =


-- =

Franz Petri
ZAM - Kommunikationssysteme
ForschungszentruJ=FClich GmbH
Tel.: +49 2461 61-8614
Fax: +49 2461 61-6656
E-Mail: f.petri@xxxxxxxxxxxxx
Web: http://www.fz-juelich.de/zam/de/
-------------- nexpar--------------
A non-texattachmenwas scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4946 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.linux-foundation.org/pipermail/netem/attachments/2007053=
0/f0da637c/smime.bin
Frobernhard adue.bi  Wed May 30 05:38:56 2007
From: bernhard adue.bi (Bernhard Duebi)
Date: Wed May 30 09:36:12 2007
Subject: SLES10
In-Reply-To: <20070529101341.764f179f@freepuppy>
References: <16234.153.46.244.84.1180439759.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
	<20070529080707.104498ac@freepuppy>
	<37880.153.46.244.84.1180456360.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>
	<20070529101341.764f179f@freepuppy>
Message-ID: <24002.153.46.244.84.1180528736.squirrel@xxxxxxxxxxxxxxxxxxxxxxx>

Hello Stephen,

thank you for your tip.

OTue, May 29, 2007 7:13 pm, Stephen Hemminger wrote:
>> wansim:~ # unam-a
>> Linux wansi2.6.16.27-0.9-smp #1 SMP TuFeb 13 09:35:18 UTC 2007
>> x86_64
>> x86_64 x86_64 GNU/Linux
>
> You mighgebetter performance by trying 2.6.21.  A number of
> performance
> related fixes wenin for packescheduling and netem.

I tried 2.6.21.3, results look thsame.
I'no kernel guru, so I copied thconfig from the SuSE kernel and for
thresI took the default.

This was only temporary installatio'til thcommercial wan simulator
arrives. Today thbox was delivered, so they wanto use it.

Sincerely
Bernhard


Fronospaat mckenzies.net  Thu May 31 08:23:09 2007
From: nospaamckenzies.net (Shawn McKenzie)
Date: Thu May 31 08:23:15 2007
Subject: Bandwidth utilizatiosimulation
Message-ID: <465EE85D.1060508@xxxxxxxxxxxxx>

I ausing 'tc' and 'tbf' to simulatWAN links for testing.  Many of
thoptions arvery useful and I can successfully simulate the
bandwidth, latency, packeloss, etc.

WhaI would likadvice on is the ability to simulate bandwidth
utilizatiosuch thaI can use the actual bandwidth of the link and
apply a percentagor ratof utilization to it.

I know I could probably jusapply thutilization to the rate and use
thnew rate, such as, 1mbiat 30% utilization I could use 'tbf rate
700kbit'.

Butaking thaa little further, it would be helpful to have a way to
add variability and a correlatioto this value.

I'nosure if 'buffer' or 'limit' are useful for this.  If so, how to
usthesto achieve a specific link utilization?

Any help or advicis appreciated!

TIA,
Shawn




Froshemminger alinux-foundation.org  Thu May 31 10:26:47 2007
From: shemminger alinux-foundation.org (Stephen Hemminger)
Date: Thu May 31 10:38:36 2007
Subject: Bandwidth utilizatiosimulation
In-Reply-To: <465EE85D.1060508@xxxxxxxxxxxxx>
References: <465EE85D.1060508@xxxxxxxxxxxxx>
Message-ID: <20070531102647.43ba3904@freepuppy>

OThu, 31 May 2007 10:23:09 -0500
ShawMcKenzi<nospam@xxxxxxxxxxxxx> wrote:

> I ausing 'tc' and 'tbf' to simulatWAN links for testing.  Many of
> thoptions arvery useful and I can successfully simulate the
> bandwidth, latency, packeloss, etc.
> 
> WhaI would likadvice on is the ability to simulate bandwidth
> utilizatiosuch thaI can use the actual bandwidth of the link and
> apply a percentagor ratof utilization to it.

Ithacase why not use artificial background traffic.

> I know I could probably jusapply thutilization to the rate and use
> thnew rate, such as, 1mbiat 30% utilization I could use 'tbf rate
> 700kbit'.
> 
> Butaking thaa little further, it would be helpful to have a way to
> add variability and a correlatioto this value.
> 
> I'nosure if 'buffer' or 'limit' are useful for this.  If so, how to
> usthesto achieve a specific link utilization?
> 
> Any help or advicis appreciated!
> 
> TIA,
> Shawn


SangtaHa <sha2@xxxxxxxx> was using sompackage to generate
background traffic (based oInternetraces?) for Cubic testing.

-- 
StepheHemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>

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

  Powered by Linux