Claudio Jeker wrote: > >From my test: > > netstat -m > 20/128034/614400 mbuf 2048 byte clusters in use (current/peak/max) > > As you can see during my tcpbench test I peaked at 128034 active clusters > which is way more then the 6144 setup by default. Oh and just for the > kicks: > Memory resource pool statistics > Name Size Requests Fail InUse Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle > mbpl 256 68895154 10 52 9645 0 9645 9645 1 38400 9641 > mcl2k 2048 7987962 11 20 64017 0 64017 64017 4 307200 64006 > > As you can see my i386 had mbuf and mcluster failures because I run the > kernel out of kvm (this would not have happend if I increased > kern.maxclusters a bit more carefully). > > Anyway, you need to properly tune your system to handle 1000 and more > TCP connections.
Hello Claudio. In my case I just replaced re(4) with bnx(4) without any "tune" so router can handle 70k interrupts without issues. http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6419 says so: "The same board equipped with a dual-port intel em card in its PCI slot is able to forward 60k packets and will not crash with more". Alexey OpenBSD 4.7-beta (GENERIC.MP) #82: Fri Feb 5 01:05:44 MST 2010 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 3720871936 (3548MB) avail mem = 3615391744 (3447MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xf06d0 (63 entries) bios0: vendor American Megatrends Inc. version "0302" date 06/01/2009 bios0: ASUSTeK Computer INC. P5QL-VM EPU acpi0 at bios0: rev 0 acpi0: tables DSDT FACP APIC MCFG OEMB HPET GSCI SSDT acpi0: wakeup devices P0P2(S4) P0P3(S4) P0P1(S4) UAR1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) EUSB(S4) USB4(S4) USB5(S4) USB6(S4) USBE(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 2930.81 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16, xTPR,NXE,LONG cpu0: 3MB 64b/line 8-way L2 cache cpu0: apic clock running at 266MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz, 2930.40 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16, xTPR,NXE,LONG cpu1: 3MB 64b/line 8-way L2 cache ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (P0P3) acpiprt2 at acpi0: bus 5 (P0P1) acpiprt3 at acpi0: bus 4 (P0P4) acpiprt4 at acpi0: bus -1 (P0P8) acpiprt5 at acpi0: bus 3 (P0P9) acpicpu0 at acpi0: PSS acpicpu1 at acpi0: PSS aibs0 at acpi0 acpibtn0 at acpi0: PWRB cpu0: Enhanced SpeedStep 2930 MHz: speeds: 2936, 2670, 2403, 2136, 1870, 1603 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel G45 Host" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel G45 PCIE" rev 0x03: apic 2 int 16 (irq 10) pci1 at ppb0 bus 1 ppb1 at pci1 dev 0 function 0 "ServerWorks PCIE-PCIX" rev 0xc3 pci2 at ppb1 bus 2 bnx0 at pci2 dev 0 function 0 "Broadcom BCM5708" rev 0x12: apic 2 int 16 (irq 10) vga1 at pci0 dev 2 function 0 "Intel G45 Video" rev 0x03 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) intagp0 at vga1 agp0 at intagp0: aperture at 0xe0000000, size 0x10000000 inteldrm0 at vga1: apic 2 int 16 (irq 10) drm0 at inteldrm0 uhci0 at pci0 dev 26 function 0 "Intel 82801JI USB" rev 0x00: apic 2 int 16 (irq 10) uhci1 at pci0 dev 26 function 1 "Intel 82801JI USB" rev 0x00: apic 2 int 21 (irq 14) uhci2 at pci0 dev 26 function 2 "Intel 82801JI USB" rev 0x00: apic 2 int 18 (irq 15) ehci0 at pci0 dev 26 function 7 "Intel 82801JI USB" rev 0x00: apic 2 int 18 (irq 15) usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb2 at pci0 dev 28 function 0 "Intel 82801JI PCIE" rev 0x00: apic 2 int 17 (irq 11) pci3 at ppb2 bus 4 ppb3 at pci0 dev 28 function 5 "Intel 82801JI PCIE" rev 0x00: apic 2 int 16 (irq 10) pci4 at ppb3 bus 3 re0 at pci4 dev 0 function 0 "Realtek 8168" rev 0x01: RTL8168 2 (0x3800), apic 2 int 17 (irq 11), address 90:e6:ba:b6:ec:6e rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2 uhci3 at pci0 dev 29 function 0 "Intel 82801JI USB" rev 0x00: apic 2 int 23 (irq 3) uhci4 at pci0 dev 29 function 1 "Intel 82801JI USB" rev 0x00: apic 2 int 19 (irq 5) uhci5 at pci0 dev 29 function 2 "Intel 82801JI USB" rev 0x00: apic 2 int 18 (irq 15) ehci1 at pci0 dev 29 function 7 "Intel 82801JI USB" rev 0x00: apic 2 int 23 (irq 3) usb1 at ehci1: USB revision 2.0 uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb4 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0x90 pci5 at ppb4 bus 5 rl0 at pci5 dev 0 function 0 "Realtek 8139" rev 0x10: apic 2 int 16 (irq 10), address 00:e0:4d:05:ef:15 rlphy0 at rl0 phy 0: RTL internal PHY xl0 at pci5 dev 1 function 0 "3Com 3c905C 100Base-TX" rev 0x78: apic 2 int 17 (irq 11), address 00:03:99:89:c7:ea bmtphy0 at xl0 phy 24: 3C905C internal PHY, rev. 7 pcib0 at pci0 dev 31 function 0 "Intel 82801JIB LPC" rev 0x00 ahci0 at pci0 dev 31 function 2 "Intel 82801JI AHCI" rev 0x00: apic 2 int 19 (irq 5), AHCI 1.2 scsibus0 at ahci0: 32 targets sd0 at scsibus0 targ 1 lun 0: <ATA, WDC WD2500AAJS-6, 02.0> SCSI3 0/direct fixed sd0: 238475MB, 512 bytes/sec, 488397168 sec total ichiic0 at pci0 dev 31 function 3 "Intel 82801JI SMBus" rev 0x00: apic 2 int 18 (irq 15) iic0 at ichiic0 spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5 spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL5 usb2 at uhci0: USB revision 1.0 uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci1: USB revision 1.0 uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci2: USB revision 1.0 uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb5 at uhci3: USB revision 1.0 uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb6 at uhci4: USB revision 1.0 uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb7 at uhci5: USB revision 1.0 uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: <PC speaker> spkr0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 lm0 at isa0 port 0x290/8: W83627DHG mtrr: Pentium Pro MTRR support ugen0 at uhub5 port 2 "Cypress Semiconductor USB to Serial" rev 1.10/0.02 addr 2 vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root root on sd0a swap on sd0b dump on sd0b bnx0: address 00:21:5a:d3:2c:d4 brgphy0 at bnx0 phy 1: BCM5708C 10/100/1000baseT PHY, rev. 6
