libalias / ng_nat memory leak

Vadim A. Shklyaev lexx at cpms.ru
Tue Jun 26 20:17:43 UTC 2007


Hello, freebsd-net.

  We have large NAT server with 256 NAT instances there. Earlier, we
  used a lot of natd daemons, but recently (some months ago) i've
  moved it to ng_nat.

  And it seems to me, that there is a memory leak there, cause
  allocated memory grows constantly every day - after system startup
  there were only about 40Mbytes allocated, now - after 27 days uptime
  - it has about 373Mb. That machine has 1Gb of RAM, and it's proved,
  that it cannot work more than 2 months cause of this.

  Can you advise something, what can I try to do to debug or fix this
  issue?

# sysctl kern.malloc | grep libalias
     libalias2914025373438K       -1590585033  128
# uname -a
FreeBSD nt1 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed May 30 04:37:13 MSD 2007     root at nt1:/mnt/obj/mnt/src/sys/SRV64-MP  amd64
# cat /var/run/dmesg.boot | head -24
Copyright (c) 1992-2007 The FreeBSD Project.                                                          
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994                              
        The Regents of the University of California. All rights reserved.                             
FreeBSD is a registered trademark of The FreeBSD Foundation.                                          
FreeBSD 6.2-STABLE #0: Wed May 30 04:37:13 MSD 2007                                                   
    root at nt1:/mnt/obj/mnt/src/sys/SRV64-MP
ACPI APIC Table: <INTEL  04DT044 >                                                                    
Timecounter "i8254" frequency 1193182 Hz quality 0                                                    
CPU: Intel(R) Pentium(R) D CPU 3.40GHz (3398.30-MHz K8-class CPU)                                     
  Origin = "GenuineIntel"  Id = 0xf64  Stepping = 4                                                   
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,
DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>                                                             
  Features2=0xe49d<SSE3,RSVD2,MON,DS_CPL,EST,CNTX-ID,CX16,XTPR,<b15>>                                 
  AMD Features=0x20100800<SYSCALL,NX,LM>                                                              
  AMD Features2=0x1<LAHF>                                                                             
  Cores per package: 2                                                                                
real memory  = 1072013312 (1022 MB)                                                                   
avail memory = 1027846144 (980 MB)                                                                    
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs                                                   
 cpu0 (BSP): APIC ID:  0                                                                              
 cpu1 (AP): APIC ID:  1                                                                               
ioapic0: Changing APIC ID to 5                                                                        
ioapic1: WARNING: intbase 30 != expected base 24                                                      
ioapic0 <Version 2.0> irqs 0-23 on motherboard                                                        
ioapic1 <Version 2.0> irqs 30-53 on motherboard                                                       
#top
last pid: 51703;  load averages:  0.82,  0.89,  0.90                         up 27+18:15:18  23:39:17
24 processes:  1 running, 23 sleeping                                                                
CPU states:  0.0% user,  0.0% nice,  6.4% system, 43.3% interrupt, 50.3% idle                        
Mem: 12M Active, 4268K Inact, 34M Wired, 63M Buf, 521M Free                                          
Swap:                                                                                                

-- 
Best regards,
 Vadim A. Shklyaev, CPMS Network
 http://network.cpms.ru/
 LX-RIPE, LEXX-RIPN, ICQ 23924367



More information about the freebsd-net mailing list