From owner-freebsd-stable@FreeBSD.ORG Wed Feb 23 23:59:39 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 B5155106566C for ; Wed, 23 Feb 2011 23:59:39 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by mx1.freebsd.org (Postfix) with ESMTP id E4B708FC19 for ; Wed, 23 Feb 2011 23:59:38 +0000 (UTC) Received: from omta18.westchester.pa.mail.comcast.net ([76.96.62.90]) by qmta13.westchester.pa.mail.comcast.net with comcast id BbXC1g0081wpRvQ5DbzeG9; Wed, 23 Feb 2011 23:59:38 +0000 Received: from koitsu.dyndns.org ([98.248.33.18]) by omta18.westchester.pa.mail.comcast.net with comcast id Bbza1g01K0PUQVN3ebzbAB; Wed, 23 Feb 2011 23:59:38 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 00A3E9B427; Wed, 23 Feb 2011 15:59:32 -0800 (PST) Date: Wed, 23 Feb 2011 15:59:32 -0800 From: Jeremy Chadwick To: Henner Heck Message-ID: <20110223235932.GA8863@icarus.home.lan> References: <4D6430D9.8060609@web.de> <20110222224332.GA12504@icarus.home.lan> <4D659B12.6050700@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D659B12.6050700@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: Wed, 23 Feb 2011 23:59:39 -0000 On Thu, Feb 24, 2011 at 12:41:06AM +0100, Henner Heck wrote: > > Here are my testresults: > > *Disabling sendfile in smb.conf *(no patching yet) > - free memory drops to 570M and stays there > - copy speed from share 75MB/s, CPU load 50% > (why not 100% and higher speed?) See below. > *Patched kernel with patch 218795* > - without sendfile > Copying works. > - with sendfile > Copy speed often drops to zero after several hundred megabytes, > no more data is transmitted, the BSD machine is 100% idle and > responsive. > After some time Total Commander claims that the file cannot be copied, > on retry it sometimes copies the file, but the problem will usually > come up > with the same file again or one of the next files. > > The speed in both cases is between 40-70MB/s, CPU load is 30-50%, > the free memory drops to about 250M, no running out of memory. It's important to note that you're copying over the network. Samba is well-known throughout the community for not performing "extremely fast", even on certain distributions of Linux. The best way to gain speed improvements is to make use of AIO. I also noticed that your smb.conf tunings may be incorrect for AIO, but you will need to adjust things and try combinations to figure out what works best for you across the network. > *Other observations* > A process named "intr" causes about 20% CPU load when copying. > I wonder why. I believe this is an interrupt handler thread in the kernel, which is quite justified given what all is going on within the system during this kind of operation. > *Conclusions* > When using sendfile the patch replaced a freezing system with unreliable > copying. Without sendfile there seems to be no problem. > > I am a bit dissapointed with the speed, since the CPU is not at all > maxed out. > The NIC is a PCIe Intel CT 1000 (I hadn't mentioned that before.) > Any idea where the bottleneck might be? Almost certainly Samba, but there is little-to-nothing one can do about it. If you want to verify it's Samba, enable ftpd on your system and do FTP transfers instead (do both a GET and a PUT for testing speed in both directions). Good luck. -- | 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 |