2001-03-15 10:15:28

by Jerome Tollet

[permalink] [raw]
Subject: kernel 2.4.2 network performances

Hello, i have a problem with the network layer of linux kernel 2.4.2
I wrote a minimalist program which basically sends UDP datagrams over
the network in an infinite loop.
Under Linux 2.2.x, this program floods the network and my xosview prints
that 12 MB/s are sent over my 100Mbit ethernet.

Under Linux 2.4.2, this program can't flood the network because my
xosview (the same ;-) ) tells me that 4.6MB/s are sent over my ethernet
although my cpu is not overloaded.

I think that Linux 2.4.2 limits the rate of packets sent over the
network with some soft parameters.
*Does anyone have any idea ?
*Could someone explains me the new
/proc/sys/net/core/{hot_list_length|no_cong|no_cong_thresh|mod_cong|lo_cong}
parameters ?
*Where could i see in the code this soft limits ?

Thanks for your help.
Please CC me your response while i didn't subscribed to the mailing
list.

------------------------
Jerome Tollet
[email protected]
http://www.qosmos.net
------------------------


2001-03-15 13:43:45

by Sampsa Ranta

[permalink] [raw]
Subject: Re: kernel 2.4.2 network performances

On Thu, 15 Mar 2001, Jerome Tollet wrote:

> Hello, i have a problem with the network layer of linux kernel 2.4.2
> I wrote a minimalist program which basically sends UDP datagrams over
> the network in an infinite loop.
> Under Linux 2.2.x, this program floods the network and my xosview prints
> that 12 MB/s are sent over my 100Mbit ethernet.
>
> Under Linux 2.4.2, this program can't flood the network because my
> xosview (the same ;-) ) tells me that 4.6MB/s are sent over my ethernet
> although my cpu is not overloaded.
>
> I think that Linux 2.4.2 limits the rate of packets sent over the
> network with some soft parameters.
> *Does anyone have any idea ?
> *Could someone explains me the new
> /proc/sys/net/core/{hot_list_length|no_cong|no_cong_thresh|mod_cong|lo_cong}
> parameters ?
> *Where could i see in the code this soft limits ?

Yesterday I discovered that the load I can throw out to network seems to
depend on other activities running on machine. I was able to get
throughput of 33M/s with ATM when machine was idle, while I compiled
kernel at same time, the throughput was 135M/s.

So, I suggest you try to compile kernel while running your UDP stream!

- Sampsa Ranta


2001-03-16 09:35:09

by Helge Hafting

[permalink] [raw]
Subject: Re: kernel 2.4.2 network performances

Sampsa Ranta wrote:

> Yesterday I discovered that the load I can throw out to network seems to
> depend on other activities running on machine. I was able to get
> throughput of 33M/s with ATM when machine was idle, while I compiled
> kernel at same time, the throughput was 135M/s.
>
> So, I suggest you try to compile kernel while running your UDP stream!

Ouch. My guess is the kernel looks for stuff to do when scheduling, and
compiling will definitely cause more of that. Maybe it waits for
the next timer interrupt when idle, instead of checking if there's
more to do?

Helge Hafting

2001-03-16 23:25:32

by Bernd Eckenfels

[permalink] [raw]
Subject: Re: kernel 2.4.2 network performances

In article <[email protected]> you wrote:
> Yesterday I discovered that the load I can throw out to network seems to
> depend on other activities running on machine. I was able to get
> throughput of 33M/s with ATM when machine was idle, while I compiled
> kernel at same time, the throughput was 135M/s.

- which protocol/application you have used for this
- how do you have measured throughput (try wristwatch!)

I could think that applications can profit from increased context switches
count, especially if there is a handshake network protocol going on. But it
could also be some hardware problems.

Greetings
Bernd

2001-03-16 23:56:36

by bert hubert

[permalink] [raw]
Subject: Re: kernel 2.4.2 network performances

On Thu, Mar 15, 2001 at 03:42:37PM +0200, Sampsa Ranta wrote:

> Yesterday I discovered that the load I can throw out to network seems to
> depend on other activities running on machine. I was able to get
> throughput of 33M/s with ATM when machine was idle, while I compiled
> kernel at same time, the throughput was 135M/s.
>
> So, I suggest you try to compile kernel while running your UDP stream!

Try raising HZ. Perhaps your driver depends on it. It shouldn't, but who
knows.

Regards,

bert

--
http://www.PowerDNS.com Versatile DNS Services
Trilab The Technology People
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet

2001-03-21 23:18:14

by Anders Fugmann

[permalink] [raw]
Subject: Re: kernel 2.4.2 network performances

Hi Jerome.

As Mr. Hafting says, is seems that there is a softirq missing somewhere.
If this is the case, it should help to make some add some systemcalls in
your program, since a softirq should happen at every system-call exit.

Try adding:

getpid();

in the innermost loop, and see if it helps.

I would be happy to look deeper into it, so if you could send me your
test program and I'll see if I can find anything. Please append the
result from the code with and without the getpid call.


Regards
Anders Fugmann

--
Hi. I'm a .signature virus.
Please copy me into your .signature file and help me spread.

2001-03-22 17:30:57

by Anders Fugmann

[permalink] [raw]
Subject: Re: kernel 2.4.2 network performances

Hi again.

I've written my own test program, and I get 12M throughput.

I used a packet size of 1024 Bytes. Smaller packages seems to result in
less throughput.

There was no load on the machine I tested on. Does the throughput get
better is there is a lot of stress on the machine? (eg. compiling kernel
with -j 10).

It could also be the NIC itself, but this I cannot test (I'm using a
3Com 905b) card. Have you tried to replace the NIC?


--
Hi. I'm a .signature virus.
Please copy me into your .signature file and help me spread.