From owner-freebsd-fs@FreeBSD.ORG Tue Feb 8 21:22:04 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 91AE8106566C for ; Tue, 8 Feb 2011 21:22:04 +0000 (UTC) (envelope-from gpm@hotplug.ru) Received: from shadow.rusoft.ru (shadow.rusoft.ru [217.16.18.75]) by mx1.freebsd.org (Postfix) with ESMTP id 440098FC0A for ; Tue, 8 Feb 2011 21:22:04 +0000 (UTC) Received: from shadow.rusoft.ru (localhost [127.0.0.1]) by shadow.rusoft.ru (Postfix) with ESMTP id B478B4FD9; Wed, 9 Feb 2011 00:22:02 +0300 (MSK) Received: from jazz.rusoft.ru (unknown [83.222.3.162]) by shadow.rusoft.ru (Postfix) with ESMTP id 995174FD8; Wed, 9 Feb 2011 00:22:02 +0300 (MSK) Received: from ghost-pc.home.lan (ghostmaster.static.corbina.ru [78.107.250.255]) by jazz.rusoft.ru (Postfix) with ESMTPA id 3E8631CC00F; Wed, 9 Feb 2011 00:22:02 +0300 (MSK) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Bartosz Stec" , "Kostik Belousov" References: <4D510BBB.1060708@kkip.pl> <20110208102727.GA8555@icarus.home.lan> <4D511F65.2050503@kkip.pl> <4D519F97.2000805@kkip.pl> <20110208203653.GC78089@deviant.kiev.zoral.com.ua> Date: Wed, 09 Feb 2011 00:22:01 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Emil Muratov" Message-ID: In-Reply-To: <20110208203653.GC78089@deviant.kiev.zoral.com.ua> User-Agent: Opera Mail/11.01 (Win32) X-Virus-Scanned: ClamAV using ClamSMTP 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:22:04 -0000 >> >>Simple test: if you disable use of sendfile (but not AIO) in Samba, >> does >> >>the problem go away? >> >I've just disabled sendfile in smb.conf and I'll report in about 2 >> >days, after reboot which I will perform tonight. >> >I hope it won't hit samba performance too much ;) >> > >> We didn't need to wait 2 days :) >> Now I can confirm that sendfile under SAMBA + ZFS are responsible for >> issue. Here's sample output from my monitoring script[1] (update every 2 >> seconds): >> >> >> This behaviour has been seen while copying 600MB file from SAMBA share >> with sendfile enabled. >> It doesn't happen when writing to samba share, and it doesn't happen >> with sendfile disabled, both ways. >> For me it looks like memory which leaks should be added to wired pool >> and belongs to ARC, but appareantly this doesn't work well and WIRED: >> 1303.86 MB all the time. >> >> [1] http://pastebin.com/sQUyQbmm > > Try this. I the similar fix is needed for tmpfs, but there are some > more issues and pending rewrite, so I decided not to touch it. > > commit 8e5885bce1afecd419e40240a2d7ab90deb0392a > Author: Konstantin Belousov > Date: Tue Feb 8 22:35:29 2011 +0200 > > Do not forget to activate the page > > diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > index e8191b3..7343c72 100644 > --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c What is this patch up against? I can't apply it to the STABLE. :(