From owner-freebsd-fs@FreeBSD.ORG Thu Jan 13 10:37:11 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 4D801106566B for ; Thu, 13 Jan 2011 10:37:11 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id EBF6B8FC0C for ; Thu, 13 Jan 2011 10:37:10 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 8E5B045C8A; Thu, 13 Jan 2011 11:37:09 +0100 (CET) Received: from localhost (pdawidek.whl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9DEE945684; Thu, 13 Jan 2011 11:37:04 +0100 (CET) Date: Thu, 13 Jan 2011 11:36:57 +0100 From: Pawel Jakub Dawidek To: Nik Azam Message-ID: <20110113103657.GC1723@garage.freebsd.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WfZ7S8PLGjBY9Voh" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 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: Thu, 13 Jan 2011 10:37:11 -0000 --WfZ7S8PLGjBY9Voh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 13, 2011 at 12:36:51AM +0000, Nik Azam wrote: > Hi all, >=20 > For the past few weeks, I noticed that the amount of memory reported in t= op > (sum of active, inact, wired, cache buf and free) keeps decreasing as the > uptime increases. I can't pinpoint to when I first noticed this, as I have > updated the system a few times just in case this has been fixed. >=20 > The box has 8GB of RAM, running 8.2-PRERELEASE r216693. The ZFS pool > consists of two RAIDZ1 with 5 disks each and 50GB L2 ARC. Root filesystem= is > on UFS on separate disk. I have samba, netatalk, istgt, mysql and apache > running on the box. >=20 > After booting up, top reports I have 8GB of memory as expected. After mov= ing > files around in the ZFS pool, the ARC grows to 4GB (the maximum size I se= t). > Now the box has been up for 10 days, and the sum of memory reported in top > is about 4GB (3GB wired). ARC size is about 2GB. I tried stopping all the > services running, but this didn't help. When unmounting the ZFS pool (via > /etc/rc.d/zfs stop), top reports that I have 8GB again. Throughout the 10 > days period, there is no user activity at all to the UFS filesystem. >=20 > Is there anything sinister happening here? Or is it just top is playing > tricks on me? The easiest way to check for memory leaks is to export the pool and unload zfs.ko. If the leaks exist, they will be reported on the system console. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --WfZ7S8PLGjBY9Voh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk0u1ckACgkQForvXbEpPzTvqQCfZnvv3sUW0uQM+DPi+P4SDTvp vuUAnRmKLacklj3OcVEaZCwdYMKqDG2F =L57n -----END PGP SIGNATURE----- --WfZ7S8PLGjBY9Voh--