From owner-freebsd-stable@FreeBSD.ORG Tue Feb 22 22:43:42 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02AD81065672 for ; Tue, 22 Feb 2011 22:43:42 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA11.westchester.pa.mail.comcast.net (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) by mx1.freebsd.org (Postfix) with ESMTP id A356A8FC08 for ; Tue, 22 Feb 2011 22:43:41 +0000 (UTC) Received: from omta17.westchester.pa.mail.comcast.net ([76.96.62.89]) by QMTA11.westchester.pa.mail.comcast.net with comcast id BAKf1g0091vXlb85BAjiSA; Tue, 22 Feb 2011 22:43:42 +0000 Received: from koitsu.dyndns.org ([98.248.33.18]) by omta17.westchester.pa.mail.comcast.net with comcast id BAjZ1g01E0PUQVN3dAjfNr; Tue, 22 Feb 2011 22:43:40 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 383809B422; Tue, 22 Feb 2011 14:43:32 -0800 (PST) Date: Tue, 22 Feb 2011 14:43:32 -0800 From: Jeremy Chadwick To: Henner Heck Message-ID: <20110222224332.GA12504@icarus.home.lan> References: <4D6430D9.8060609@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D6430D9.8060609@web.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD 8.2 Release, ZFS + Samba, running out of memory X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 22:43:42 -0000 On Tue, Feb 22, 2011 at 10:55:37PM +0100, Henner Heck wrote: > i experience freezing of my FreeBSD machine when performing certain > operations > on a Samba share. > > Technical info: > - FreeBSD 8.2 Release 64 Bit (it also happened with 8.2 RC3) > - Samba 3.5.6.1 > - Athlon II Quadcore, 4 GB Ram > - 1 SSD with a ZFS pool (No.0) containing the FreeBSD system > - 12x2TB RaidZ2 pool (No.1) for data, created on 12 GEOM eli encrypted > partitions on 12 disks, > shared to a Windows 7 PC with Samba, > 8 of the disks are attached to 2 Marvell SATA controllers, 4 to the > onboard controller > - ZPool v15, ZFS v4 > > Scenarios (checked using top): > > A: > When copying files from one directory in pool 1 to another, the free > memory drops from > about 3700M to abaout 200M in the process, but seems to stabilize then. > > B: > When copying the files onto a Windows machine using the Samba share, > the free memory seems to stabilize at about 100M. > > C: > When computing a hashvalue of files from the share on Windows or doing a > binary compare to copies of the files stored on the Windows PC (using > Total Commander), > the free memory on the FreeBSD machine drops even lower and shortly > after the BSD system freezes. > Here is the last top output i got via ssh: > > ... > > Does anyone have advice on how to get rid of this problem? > > ... > > *smb.conf* (a bit anonymized) > > [global] > use sendfile = true Set this to "false" and the problem might go away. You can try some of the patches others have recommended as well (which will permit you to use sendfile going forward), but if you don't want to deal with patches, the workaround should be fine. If you still experience issues after that, possibly some loader.conf tuning for ZFS is needed. Also, one question: when you say "freezes", do you mean "completely locks up hard" or "the system seems alive but seems to be spending all of its CPU time doing something else"? Try hitting NumLock on the system's keyboard to see if the LED toggles on/off; if it does, the system isn't frozen, but is catatonic to some degree. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |