Skip to contentSkip to conversation

kernel 2.4.2 network performances

DISCUSSION Jerome Tollet 6 participants 7 messages Mar 15, 2001 – Mar 22, 2001

lore
Share & tools
lore
#0 lore raw

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]
www.qosmos.net
------------------------

#1 lore raw
Quoted 10 lines · Jerome Tollet

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.

Quoted 7 lines

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

#2 lore raw
Quoted 6 lines · Sampsa Ranta

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

#3 lore raw
In reply to Sampsa Ranta
Quoted 4 lines · 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

#4 lore raw
In reply to Jerome Tollet
Quoted 6 lines · Sampsa Ranta

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

Signature · 3 lines
http://www.PowerDNS.com      Versatile DNS Services  
Trilab                       The Technology People   
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
#5 lore raw
In reply to Jerome Tollet

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

Signature · 2 lines
Hi. I'm a .signature virus.
Please copy me into your .signature file and help me spread.
#6 lore raw
In reply to Jerome Tollet

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?

Signature · 2 lines
Hi. I'm a .signature virus.
Please copy me into your .signature file and help me spread.