On Fri, Aug 07, 2009 at 09:27:01PM +0000, Stuart Henderson wrote:

> So is anyone else seeing an mbuf leak with rl(4) or is it specific to
> this machine/configuration?

No problems here, running amd64 4.5 with a wireless card in hostap mode, as well
as an rl. (Note however that I'm not running GENERIC, but GENERIC with RAIDframe
and RAID_AUTOCONFIG.)

$ netstat -m
210 mbufs in use:
        193 mbufs allocated to data
        4 mbufs allocated to packet headers
        13 mbufs allocated to socket names and addresses
192/724/6144 mbuf 2048 byte clusters in use (current/peak/max)
0/8/6144 mbuf 4096 byte clusters in use (current/peak/max)
0/8/6144 mbuf 8192 byte clusters in use (current/peak/max)
0/8/6144 mbuf 9216 byte clusters in use (current/peak/max)
0/8/6144 mbuf 12288 byte clusters in use (current/peak/max)
0/8/6144 mbuf 16384 byte clusters in use (current/peak/max)
0/8/6144 mbuf 65536 byte clusters in use (current/peak/max)
2060 Kbytes allocated to network (21% in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines

$ uptime
 1:54PM  up 39 days, 17:22, 1 user, load averages: 0.75, 0.92, 0.77

$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33160
        priority: 0
        groups: lo
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:11:6b:3d:7f:6a
        priority: 0
        groups: wlan
        media: IEEE802.11 autoselect mode 11g hostap
        status: active
        ieee80211: nwid stupendous chan 1 bssid 00:11:6b:3d:7f:6a wpapsk
<not displayed> wpaprotos wpa1 wpaakms psk wpaciphers tkip wpagroupcipher
tkip 100dBm
        inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
        inet6 fe80::211:6bff:fe3d:7f6a%ral0 prefixlen 64 scopeid 0x1
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:e0:4d:52:a8:d1
        priority: 0
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::2e0:4dff:fe52:a8d1%rl0 prefixlen 64 scopeid 0x2
nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:13:d4:ae:99:b7
        priority: 0
        groups: egress
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 82.95.239.113 netmask 0xffffffff broadcast 82.95.239.113
        inet6 fe80::213:d4ff:feae:99b7%nfe0 prefixlen 64 scopeid 0x3
enc0: flags=0<> mtu 1536
        priority: 0
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33160
        priority: 0
        groups: pflog


OpenBSD 4.5 (GENERIC+RAIDAUTO) #0: Fri May  8 16:31:44 CEST 2009
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC+RAIDAUTO
real mem = 2146369536 (2046MB)
avail mem = 2071830528 (1975MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0000 (72 entries)
bios0: vendor Phoenix Technologies, LTD version "ASUS A8N-E ACPI BIOS Revision 
1013" date 04/07/2006
bios0: ASUSTeK Computer INC. A8N-E
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP SSDT MCFG
acpi0: wakeup devices HUB0(S5) XVR0(S5) XVR1(S5) XVR2(S5) XVR3(S5) USB0(S4) 
USB2(S4) MMAC(S5) MMCI(S5) UAR1(S5) PS2M(S4) PS2K(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 5 (HUB0)
acpicpu0 at acpi0: PSS
acpitz0 at acpi0: critical temperature 75 degC
acpibtn0 at acpi0: PWRB
cpu0 at mainbus0: (uniprocessor)
cpu0: AMD Athlon(tm) 64 Processor 3500+, 2211.59 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: AMD erratum 89 present, BIOS upgrade may be required
cpu0: Cool'n'Quiet K8 2211 MHz: speeds: 2200 2000 1800 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1
"NVIDIA nForce4 DDR" rev 0xa3 at pci0 dev 0 function 0 not configured
pcib0 at pci0 dev 1 function 0 "NVIDIA nForce4 ISA" rev 0xa3
nviic0 at pci0 dev 1 function 1 "NVIDIA nForce4 SMBus" rev 0xa2
iic0 at nviic0
spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM non-parity PC3200CL3.0
spdmem1 at iic0 addr 0x51: 512MB DDR SDRAM non-parity PC3200CL3.0
spdmem2 at iic0 addr 0x52: 512MB DDR SDRAM non-parity PC3200CL3.0
spdmem3 at iic0 addr 0x53: 512MB DDR SDRAM non-parity PC3200CL3.0
iic1 at nviic0
pciide0 at pci0 dev 6 function 0 "NVIDIA nForce4 IDE" rev 0xf2: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
pciide0: channel 0 ignored (disabled)
pciide0: channel 1 ignored (disabled)
pciide1 at pci0 dev 8 function 0 "NVIDIA nForce4 SATA" rev 0xf3: DMA
pciide1: using irq 5 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <WDC WD1200SD-01KCC0>
wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
wd1 at pciide1 channel 1 drive 0: <WDC WD1200SD-01KCC0>
wd1: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
wd1(pciide1:1:0): using PIO mode 4, Ultra-DMA mode 5
ppb0 at pci0 dev 9 function 0 "NVIDIA nForce4 PCI-PCI" rev 0xa2
pci1 at ppb0 bus 5
ral0 at pci1 dev 6 function 0 "Ralink RT2561S" rev 0x00: irq 12, address 
00:11:6b:3d:7f:6a
ral0: MAC/BBP RT2561C, RF RT2527
rl0 at pci1 dev 7 function 0 "Realtek 8139" rev 0x10: irq 10, address 
00:e0:4d:52:a8:d1
rlphy0 at rl0 phy 0: RTL internal PHY
vga1 at pci1 dev 8 function 0 "S3 86C968-0" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
nfe0 at pci0 dev 10 function 0 "NVIDIA CK804 LAN" rev 0xa3: irq 7, address 
00:13:d4:ae:99:b7
eephy0 at nfe0 phy 1: 88E1111 Gigabit PHY, rev. 2
ppb1 at pci0 dev 11 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci2 at ppb1 bus 4
ppb2 at pci0 dev 12 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci3 at ppb2 bus 3
ppb3 at pci0 dev 13 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci4 at ppb3 bus 2
ppb4 at pci0 dev 14 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci5 at ppb4 bus 1
pchb0 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00
pchb1 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00
pchb2 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00
kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00
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
it0 at isa0 port 0x2e/2: IT8712F rev 7, EC port 0x290
Kernelized RAIDframe activated
mtrr: Pentium Pro MTRR support
raid1 at root: (RAID Level 1) total number of sectors is 228146560 (111399 MB) 
as root
softraid0 at root
softraid0: wd0h can not read metadata version 0, expected 3
softraid0: wd1h can not read metadata version 0, expected 3
root on raid1a
swapmount: no device


> 
> On 2009-08-07, Lars Kotthoff <[email protected]> wrote:
> > Hi all,
> >
> >  after my post in June [1] I've removed the wireless card that seemed to be
> > causing the memory problems and my system is more stable now. However, after
> > about three weeks of uptime, memory starts running low again and the machine
> > starts swapping constantly.
> >
> > netstat -m gives me
> > 33805 mbufs in use:
> >         33790 mbufs allocated to data
> >         3 mbufs allocated to packet headers
> >         12 mbufs allocated to socket names and addresses
> > 6/94/6144 mbuf 2048 byte clusters in use (current/peak/max)
> > 0/8/6144 mbuf 4096 byte clusters in use (current/peak/max)
> > 0/8/6144 mbuf 8192 byte clusters in use (current/peak/max)
> > 0/8/6144 mbuf 9216 byte clusters in use (current/peak/max)
> > 0/8/6144 mbuf 12288 byte clusters in use (current/peak/max)
> > 0/8/6144 mbuf 16384 byte clusters in use (current/peak/max)
> > 0/8/6144 mbuf 65536 byte clusters in use (current/peak/max)
> > 156296 Kbytes allocated to network (99% in use)
> > 0 requests for memory denied
> > 0 requests for memory delayed
> > 0 calls to protocol drain routines
> >
> > 150 MB for network seems a bit much to me, especially since I can literally
> > watch that number grow. The system has 3 wired ethernet interfaces (2 of 
> > them in
> > use), pflog0 and enc0. No other interfaces. Traffic levels are very 
> > moderate --
> > max 1 GB per day.
> >
> > Any ideas what's going on and what I could do about this?
> >
> > Thanks,
> >
> > Lars
> >
> >
> > [1] http://www.nabble.com/Memory-problems-on-4.5-td23901874.html
> 

-- 
Jurjen Oskam

Savage's Law of Expediency:
        You want it bad, you'll get it bad.

Reply via email to