Skip to contentSkip to conversation

Bridge performance problem

Bridge Joubert Berger 3 participants 4 messages Aug 26, 2004 – Aug 27, 2004 Ethernet bridge

lore
Share & tools
lore
#0 lore raw

I need some help understanding a strange bridge performance problem I am seeing. Maybe I am making more out of this than I need to. I need your opinions.

The setup:

The first configuration is two machines connected via a cross over cable:

Machine A <====> Machine B

The second configuration is two machines with a Linux bridge between them:

Machine A <===> Linux Bridge <===> Machine B

I am using netperf to do some performance measuring.

I am running two tests. One is the "streaming" test (the default test for netperf) and the other is the "Connect Request/Response" (TCP_CRR) test.

When I run the stream test against the top two setups, I get near line speed. I am happy with these numbers.

When I run the TCP_CRR test, for the first setup I get around 2200 connections per second, but in the second configuration I are getting around 700-800 connections per second. Why am I getting this big of a difference?

I am running Redhat kernel 2.4.20-30.9 (RH9). I also changed the txqueuelen on the two bridge interfaces to 50000.

Anyone have any idea why I am seeing such a big difference in the TCP_CRR test? The introduction of the Linux bridge cause me some real performance problems.

--joubert

#1 lore raw
Quoted 22 lines · On Wed, 25 Aug 2004 23:20:32 -0400 Joubert Berger <[email protected]>…

I need some help understanding a strange bridge performance problem I am seeing. Maybe I am making more out of this than I need to. I need your opinions.

The setup:

The first configuration is two machines connected via a cross over cable:

Machine A <====> Machine B

The second configuration is two machines with a Linux bridge between them:

Machine A <===> Linux Bridge <===> Machine B

I am using netperf to do some performance measuring.

I am running two tests. One is the "streaming" test (the default test for netperf) and the other is the "Connect Request/Response" (TCP_CRR) test.

Quoted 7 lines

When I run the stream test against the top two setups, I get near line speed. I am happy with these numbers.

When I run the TCP_CRR test, for the first setup I get around 2200 connections per second, but in the second configuration I are getting around 700-800 connections per second. Why am I getting this big of a difference?

Because you have to process the packet twice on the bridge. What hardware are you using? If you use NIC's that have NAPI latency will be worse (but better throughput). If you use NIC's that have to copy every packet (like 8139) then it will be worse as well.

Quoted 2 lines

I am running Redhat kernel 2.4.20-30.9 (RH9). I also changed the txqueuelen on the two bridge interfaces to 50000.

Increasing queuelen shouldn't do anything but make the problem worse. If the queue is building up, then your performance is already shot. If you use a 2.6 based kernel (like Fedora Core 2 or Suse 9.1) the numbers might be better.

Quoted 5 lines

Anyone have any idea why I am seeing such a big difference in the TCP_CRR test? The introduction of the Linux bridge cause me some real performance problems.

--joubert

What is the ping time?

#2 lore raw
Quoted 10 lines · Stephen Hemminger
Quoted 5 lines · On Wed, 25 Aug 2004 23:20:32 -0400 Joubert Berger <[email protected]>…

When I run the TCP_CRR test, for the first setup I get around 2200 connections per second, but in the second configuration I are getting around 700-800 connections per second. Why am I getting this big of a difference?

Because you have to process the packet twice on the bridge. What hardware are you using?

A single Xeon 2.4G CPU. Two Intel cards (82545EM Gigabit Ethernet Controller) -- one onboard and another in an X-PCI slot. Don't remember the memory off the top of my head.

Quoted 4 lines

If you use NIC's that have NAPI latency
will be worse (but better throughput). If you use NIC's that have to copy every packet (like 8139) then it will be worse as well.

Sure that I understand. But, taking such a big hit I just don't understand. That is what is puzzling...

BTW, can you enable NAPI dynamically on the driver? Or is this a compile time only option?

Quoted 8 lines
Quoted 2 lines

I am running Redhat kernel 2.4.20-30.9 (RH9). I also changed the txqueuelen on the two bridge interfaces to 50000.

Increasing queuelen shouldn't do anything but make the problem worse. If the queue is building up, then your performance is already shot. If you use a 2.6 based kernel (like Fedora Core 2 or Suse 9.1) the numbers might be better.

Would you mind explaining what the txqueuelen does? Or point me to a location I can read about it? More about wanting to know what it does than anything else.

Quoted 8 lines
Quoted 5 lines

Anyone have any idea why I am seeing such a big difference in the TCP_CRR test? The introduction of the Linux bridge cause me some real performance problems.

--joubert

What is the ping time?

Ping times are in the .250-.300ms area.

Just to see what a switch would do, I replace the Linux Bridge with a Cisco switch and there the ping times were in the .150ms range.

I have a few other data points. I am using e1000 driver for the Intel NICs. I found some references to poor performance with the e1000 driver dealing with DITR (Dynamic Interrupt Throttle Rate)
http://www.ussg.iu.edu/hypermail/linux/kernel/0405.3/0707.html
Not sure if this is an issue. Don't know what DITR is. More research needed.

Another interesting item that I saw is that the two e1000 boards are on the same IRQ. Somewhere I read that sharing IRQ is support in the Linux kernel, but that there might be problems with sharing IRQs and NICs. More research is needed.

Finally, just to see if it was a software issue or hardware issue, I kept the OS/software the same and install on a new machine. New machine/different NICS. In this case I saw much improved performance. Whereas before I was taking a 45% hit, on this new hardware I was taking a 17% hit. This make me think I have a hardware problem.

I then went back to the original hardware with the two e1000 NICs and replaced them with two different cards. And again I saw better numbers. This leads me to think that I am having some problem with the NICs.

A lot of this is just a little more background information to paint a better picture of what I have tried.

Any other insight into this would be greatly appreciated. Sometimes pointing out the obvious helps clear the picture when you have been knee deep in it :-)

--joubert

#3 lore raw
Quoted 3 lines

Would you mind explaining what the txqueuelen does? Or point me to a location I can read about it? More about wanting to know what it does than anything else.

The TXQUEUELEN parameter is strictly for QoS, namely the PFIFO Scheduler, it sets the Queue length for that scheduler and that's all I think it does...

Quoted 2 lines

BTW, can you enable NAPI dynamically on the driver? Or is this a compile time only option?

Compile-Time only I believe, it changes the driver code a bit where interrupt handling is done I think...

Quoted 5 lines

Finally, just to see if it was a software issue or hardware issue, I kept the OS/software the same and install on a new machine. New machine/different NICS. In this case I saw much improved performance. Whereas before I was taking a 45% hit, on this new hardware I was taking a 17% hit. This make me think I have a hardware problem.

This concerns me a bit, I have a Dual-Port E1000 server adapter and I've been very happy with it's operation, I do notice however that it could be faster... The only other GbE NICS I've tried have been NatSemi 83820-Based and a Marvell OnBoard GbE NIC, both of which suck out loud as far as performance goes... The Marvell one especially, it has some kind of wierd timeout issue when receiving packets, a TCP dump shows it intermittently pausing for like 2 seconds every 10 seconds or so... I could never figure that one out...

-Chris