From owner-freebsd-net@FreeBSD.ORG Tue Jun 26 20:17:43 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB86716A400 for ; Tue, 26 Jun 2007 20:17:43 +0000 (UTC) (envelope-from lexx@cpms.ru) Received: from mail.cpms.ru (mail.cpms.ru [87.236.28.11]) by mx1.freebsd.org (Postfix) with ESMTP id 62FA113C448 for ; Tue, 26 Jun 2007 20:17:43 +0000 (UTC) (envelope-from lexx@cpms.ru) Received: from mailnull by mail.cpms.ru with spam-scanned (Exim 4.67 (FreeBSD)) (envelope-from ) id 1I3GuA-0003UN-I4 for freebsd-net@freebsd.org; Tue, 26 Jun 2007 23:40:54 +0400 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mail.cpms.ru X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=ALL_TRUSTED, REPTO_OVERQUOTE_THEBAT autolearn=disabled version=3.1.0 Received: from lxw.cpms.ru ([87.236.24.142]) by mail.cpms.ru with esmtp (Exim 4.67 (FreeBSD)) (envelope-from ) id 1I3GuA-0003UJ-D5; Tue, 26 Jun 2007 23:40:50 +0400 Date: Tue, 26 Jun 2007 23:40:35 +0400 From: "Vadim A. Shklyaev" X-Mailer: The Bat! (v3.71.04) Professional Organization: CPMS X-Priority: 3 (Normal) Message-ID: <487823463.20070626234035@cpms.ru> To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: libalias / ng_nat memory leak X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Vadim A. Shklyaev" List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2007 20:17:43 -0000 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@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@nt1:/mnt/obj/mnt/src/sys/SRV64-MP ACPI APIC Table: 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 Features2=0xe49d> AMD Features=0x20100800 AMD Features2=0x1 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 irqs 0-23 on motherboard ioapic1 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