Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Mar 2008 12:51:50 +0200
From:      hugoboy@inbox.lv
To:        freebsd-performance@freebsd.org
Subject:   FreeBSD 7.0 bridge tuning
Message-ID:  <1205491910.47da58c6ecb6a@www.inbox.lv>

next in thread | raw e-mail | index | archive | help
Hello!=0A=0AI'm trying to tune FreeBSD 7.0 bridge.=0A=0AEnvironment:=0AServ=
er - 2 x Xeon 3GHz, 2 x Gb LAN(em driver) + 1 LAN for management,=0A1GB RAM=
.=0ATesters -2 x Sunrise Telecom 100Mbit Ethernet testers for traffic=0Agen=
eration.=0A=0AWhat I have intended to achieve is to substitute proprietary =
traffic=0Ashaper Allot with FreeBSD traffic shaper(Bridge + PF + ALTQ).=0AT=
he minimum task is to make FreeBSD shaper to perform perfectly with=0A100Mb=
it traffic in all spectrum of packet lengths (from 64 bytes to=0Aat least 1=
518 bytes)=0A=0AThe situation now:=0Awith pf turned off - there is no probl=
em, bridge throughput is=0A100Mbit/s no packet loss (starting from 64 byte =
packets)=0A=0AWith pf on I have statistics:=0Apacket lengt -> Mbit/s withou=
t packet loss=0A64 -> 46=0A100 -> 66=0A150 -> 94=0A>200 -> 100=0A=0ALower c=
onfiguration of kernel/sysctl is displayed.=0A=0AI don't know what else can=
 I tune?=0A=0AIt seems to me that bottleneck is somewhere around pf/kernel =
buffers=0Aof packet headers. I read somewhere that in bridging packet paylo=
ad=0Adoes not travel through all stack - just header is evaluated.=0AIn cas=
e of 64 byte packets in the same time unit there are more=0Apackets for the=
 same bandwith on interfaces and as plain layer2=0Abridge performs 100Mbit/=
s with no problem=0Athe problem is above layer2 :)=0A=0Abtw: kern.polling.e=
nable=3D1 does not help - at packetlength 64 bytes=0Aperformance is 2x wors=
e than with interrupts.=0Akernel:=0A---------------------------=0A=0Acpu   =
          I686_CPU=0Aident           ALLOT   =0A=0A# To statically compile =
in device wiring instead of=0A/boot/device.hints=0A#hints          "GENERIC=
.hints"         # Default places to look for=0Adevices.=0A=0Amakeoptions   =
  DEBUG=3D-g                # Build kernel with gdb(1)=0Adebug symbols=0A=
=0Aoptions         SCHED_ULE               # ULE scheduler=0A#options      =
  SCHED_4BSD              # 4BSD scheduler=0Aoptions         PREEMPTION    =
          # Enable kernel thread=0Apreemption=0Aoptions         INET       =
             # InterNETworking=0A#options        INET6                   # =
IPv6 communications=0Aprotocols=0A#options        SCTP                    #=
 Stream Control Transmission=0AProtocol=0Aoptions         FFS              =
       # Berkeley Fast Filesystem=0Aoptions         SOFTUPDATES            =
 # Enable FFS soft updates=0Asupport=0Aoptions         UFS_ACL             =
    # Support for access control=0Alists=0Aoptions         UFS_DIRHASH     =
        # Improve performance on big=0Adirectories=0Aoptions         UFS_GJ=
OURNAL            # Enable gjournal-based UFS=0Ajournaling=0Aoptions       =
  MD_ROOT                 # MD is a potential root=0Adevice=0Aoptions      =
   NFSCLIENT               # Network Filesystem Client=0Aoptions         NF=
SSERVER               # Network Filesystem Server=0Aoptions         NFS_ROO=
T                # NFS usable as /, requires=0ANFSCLIENT=0Aoptions         =
MSDOSFS                 # MSDOS Filesystem=0Aoptions         CD9660        =
          # ISO 9660 Filesystem=0Aoptions         PROCFS                  #=
 Process filesystem=0A(requires PSEUDOFS)=0Aoptions         PSEUDOFS       =
         # Pseudo-filesystem framework=0Aoptions         GEOM_PART_GPT     =
      # GUID Partition Tables.=0Aoptions         GEOM_LABEL              # =
Provides labelization=0Aoptions         COMPAT_43TTY            # BSD 4.3 T=
TY compat [KEEP=0ATHIS!]=0Aoptions         COMPAT_FREEBSD4         # Compat=
ible with FreeBSD4=0Aoptions         COMPAT_FREEBSD5         # Compatible w=
ith FreeBSD5=0Aoptions         COMPAT_FREEBSD6         # Compatible with Fr=
eeBSD6=0Aoptions         SCSI_DELAY=3D5000         # Delay (in ms) before=
=0Aprobing SCSI=0Aoptions         KTRACE                  # ktrace(1) suppo=
rt=0Aoptions         SYSVSHM                 # SYSV-style shared memory=0Ao=
ptions         SYSVMSG                 # SYSV-style message queues=0Aoption=
s         SYSVSEM                 # SYSV-style semaphores=0Aoptions        =
 _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B=0Areal-time extensions=0Aopti=
ons         KBD_INSTALL_CDEV        # install a CDEV entry in=0A/dev=0Aopti=
ons         ADAPTIVE_GIANT          # Giant mutex is adaptive.=0Aoptions   =
      STOP_NMI                # Stop CPUS using NMI instead=0Aof IPI=0Aopti=
ons         AUDIT                   # Security event auditing=0A=0Aoptions =
ALTQ=0Aoptions ALTQ_CBQ=0Aoptions ALTQ_RED=0Aoptions ALTQ_RIO=0Aoptions ALT=
Q_HFSC=0Aoptions ALTQ_CDNR=0Aoptions ALTQ_PRIQ=0Aoptions ALTQ_NOPCC=0Aoptio=
ns HZ=3D1000=0Aoptions DEVICE_POLLING=0Aoptions IPSTEALTH=0Aoptions ZERO_CO=
PY_SOCKETS=0Aoptions MPTABLE_FORCE_HTT       # Enable HTT CPUs with the MP =
Table=0Aoptions IPI_PREEMPTION=0A=0A# To make an SMP kernel, the next two l=
ines are needed=0Aoptions         SMP                     # Symmetric Multi=
Processor=0AKernel=0Adevice          apic                    # I/O APIC=0A-=
-------------------------------=0A=0A/etc/sysctl.conf=0A#kern.polling.enabl=
e=3D1=0Akern.ipc.nmbcluster=3D32768=0Akern.ipc.maxsockbufs=3D2097152=0Akern=
.ipc.somaxconn=3D8192=0Akern.maxfiles=3D65536=0Akern.maxfilesperproc=3D3276=
8=0Anet.inet.tcp.delayed_ack=3D0=0Anet.inet.tcp.sendspace=3D65535=0Anet.ine=
t.udp.recvspace=3D65535=0Anet.inet.udp.maxdgram=3D57344=0Anet.local.stream.=
recvspace=3D65535=0Anet.local.stream.sendspace=3D65535=0Akern.polling.user_=
frac=3D20=0Anet.isr.direct=3D0=0Anet.inet.ip.forwarding=3D1=0A-------------=
------------------=0A=0AP.S. I tried pfSense, but as we have used Allot bef=
ore - we need to=0Asee queue statistics in graphs per queue, pfSense just o=
ffers=0Anumbers..=0ASeems to me that pFsense is good for many things but no=
t for=0Abridge+traffic shapeing - correct me if I'm wrong.=0A=0ABest regard=
s,=0AUgis=0A=0A



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1205491910.47da58c6ecb6a>