if_bridge performance issue?



Hello,

I was wondering if I'm seeing a normal issue with if_bridge and
having an IP assigned to one of the interfaces within a bridge.
I see a confusing performance problem when attempting to move
data via sftp "to" the machine versus "through" the machine. The
difference is quite pronounced. When I sftp through the bridge
to another FreeBSD machine behind it (A very old and slow
Compaq running FreeBSD 6.2), I get acceptable performance
averaging 1.5MB Per Second. When I send to the IP on the
interface of the bridge (coming in through the same em NIC),
I get ~320KB Per Second. The bridge system uses modern
SATA Drives so I'm pretty sure it's not disk speed slowing the
bridge system.

I've monitored IPFW to try and find a bottleneck in the rules for
the local interface. It turns out it's just the opposite in that when
passing through the system, many additional rules are traversed
while the rules for the local interface immediately are passed on
a dynamic rule. In fact the bridged traffic is passing through
snort_inline via divert, the local interface traffic is not.

I'm not sure I actually care that this performance difference is
occurring since very little traffic will go to the bridge system,
but it does make me wonder if I've done something odd to
cause it. Is there any reason why the local interface on an
if_bridge bridge computer would show worse performance
for the same operations that pass through the bridge to other
systems.

The config is:
Bridge System
FreeBSD 7.0 Release, if_bridge and ipfw compiled into the Kernel
Dual CPU Intel Supermicro with SATA drives
Dual port em NICs (have tried multiples now)

Test Server behind Bridge
FreeBSD 6.2 Release, runs just apache and sshd
900mhz Athlon with IDE Drives
Single port em NIC

Test Client
Dual Macintosh G5 tower running 10.4 OS-X

Results

SFTP to Bridge System
File Size: 46 MB, Duration of transfer: ~2.25 Minutes, Reported Performance: 324KBPS

SFTP to Test Server
File Size: 46 MB, Duration of transfer: ~34 Seconds, Reported Performance: 1.4MBPS

rc.conf relevant entries:

ifconfig_em1="inet 192.168.0.221 netmask 255.255.255.0 media 100baseTX mediaopt full-duplex polling"
ifconfig_em0="media 100baseTX mediaopt full-duplex polling"
# em0 LAN, em1 T1 WAN
cloned_interfaces="bridge0"
ifconfig_bridge0="addm em0 up addm em1 up"

(note, both tests are incoming through em1.)
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: bridge issues with pf rules on OpenBSD/Sparc
    ... confused as to which physical interface traffic goes in and out on ... for the bridge, I was hoping to have the bridge tell it. ... >> router always appears to match rules for le2 outbound traffic from ... I want to be functional between the LAN and AP. ...
    (comp.unix.bsd.openbsd.misc)
  • Re: Paketfiler als Bridge (was: Stealth Gateway)
    ... >>der Hauptnachteil eines solchen Paketfilters. ... Eine Ethernet Bridge nimmt alle Ethernetpakete auf einem Interface ...
    (de.comp.security.firewall)
  • Re: Multiple pvcs on Cisco 878
    ... full bridge. ... interface BRI0 ... ip route 0.0.0.0 0.0.0.0 Dialer0 ... The gateway of last resort disappears, and the routing table is shut ...
    (comp.dcom.sys.cisco)
  • Re: If_bridge behaving as HUB
    ... I have a bridge setup with a number of vlan IF's as members. ... After a while traffic destined for one member IF are sent to all member IF's. ... A bridge works like a hub, forwarding traffic from one interface to ... Multicast and broadcast packets are always forwarded to all ...
    (freebsd-net)
  • bridge issues with pf rules on OpenBSD/Sparc
    ... I bridge two interfaces, wherein one interface has an IP address ... bridging causes pf to mis-apply frames to the wrong interface. ... @4 pass out log-all quick on le0 all ... packets that TRAVERSE the router from one host on le0 to another on le2, ...
    (comp.unix.bsd.openbsd.misc)