From owner-freebsd-fs@FreeBSD.ORG Tue Feb 8 21:37:05 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FB46106566B for ; Tue, 8 Feb 2011 21:37:05 +0000 (UTC) (envelope-from admin@kkip.pl) Received: from mainframe.kkip.pl (kkip.pl [87.105.164.78]) by mx1.freebsd.org (Postfix) with ESMTP id D2D4D8FC08 for ; Tue, 8 Feb 2011 21:37:04 +0000 (UTC) Received: from static-78-8-144-74.ssp.dialog.net.pl ([78.8.144.74] helo=[192.168.0.2]) by mainframe.kkip.pl with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1PmvF2-0001fk-2V; Tue, 08 Feb 2011 22:37:03 +0100 Message-ID: <4D51B775.2010100@kkip.pl> Date: Tue, 08 Feb 2011 22:36:53 +0100 From: Bartosz Stec User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Jeremy Faulkner References: <4D510BBB.1060708@kkip.pl> <20110208102727.GA8555@icarus.home.lan> <4D511F65.2050503@kkip.pl> <4D519F97.2000805@kkip.pl> <4D51A969.5090203@gmail.com> In-Reply-To: <4D51A969.5090203@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-User: admin@kkip.pl X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Spam-Score: -8.5 X-Spam-Score-Int: -84 X-Exim-Version: 4.73 (build at 10-Jan-2011 16:29:01) X-Date: 2011-02-08 22:37:03 X-Connected-IP: 78.8.144.74:62062 X-Message-Linecount: 53 X-Body-Linecount: 40 X-Message-Size: 2101 X-Body-Size: 1352 X-Received-Count: 1 X-Recipient-Count: 2 X-Local-Recipient-Count: 2 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 Cc: freebsd-fs@freebsd.org Subject: Re: Memory leak in ZFS? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2011 21:37:05 -0000 > gldisater@constans:~% zpool upgrade > This system is currently running ZFS pool version 28. > > All pools are formatted using this version. > gldisater@constans:~% sh memleak-detect.sh > PHYSMEM: 12268.94 MB > ACTIVE: 427.57 MB > INACTIVE: 724.98 MB > WIRED: 10155.28 MB > CACHED: 28.32 MB > FREE: 556.16 MB > SUM: 11892.32 MB > ------------------------ > MISSING: 376.61 MB > > gldisater@constans:~% uname -a > FreeBSD constans 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #14: Tue Jan 18 > 15:26:02 EST 2011 root@constans:/usr/obj/usr/src/sys/CONSTANS amd64 > gldisater@constans:~% uptime > 3:22PM up 8 days, 5:07, 2 users, load averages: 0.21, 0.22, 0.24 > > Have you noticed MISSING count increasing over time or you just looking at this exact calculation? This script is far from being perfect and I don't know as much about FreeBSD internals to calculate it to show exactly zero at this point (if it is possible at all). It only calculates physical memory minus memory pools visible in top(1), and on my system it gives MISSING count about 36MB just after reboot. What's important - check if this variable is stable over time. You can confirm memory leakage if MISSING is increasing over time or while using sendfile. You can try for instance 'sh memleak-detect.sh -m -r 60' to check it every one minute. Cheers. -- Bartosz Stec