From owner-freebsd-current@FreeBSD.ORG Wed Nov 9 23:12:34 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5075F106564A for ; Wed, 9 Nov 2011 23:12:34 +0000 (UTC) (envelope-from ktouet@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id C31798FC08 for ; Wed, 9 Nov 2011 23:12:33 +0000 (UTC) Received: by wwg14 with SMTP id 14so949597wwg.31 for ; Wed, 09 Nov 2011 15:12:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=T8CFuWfIWN2++6v25jmixpi91Cks8Gc8yxvyN0jJQBU=; b=RW7g2G6R0Bsy565CdtNvVhcEDUdO3YCZD8+JKjwaW2SYxeRgTRJQwigY2ZCDQ9Njq4 XzpYWnHGeu/6iTENGCm9k57i9MKEZWGwZFdFVlXjvMOh6/1D43dA64E7bVxyJLt1pAa3 0tTnK3w5DjGrrueWwOlkgtd6d68rsAIDOkmhA= MIME-Version: 1.0 Received: by 10.216.133.13 with SMTP id p13mr1516727wei.93.1320880352718; Wed, 09 Nov 2011 15:12:32 -0800 (PST) Received: by 10.216.37.19 with HTTP; Wed, 9 Nov 2011 15:12:32 -0800 (PST) In-Reply-To: References: <82C85C01-62C4-4E75-B3F2-59D703CA5D78@gsoft.com.au> Date: Wed, 9 Nov 2011 17:12:32 -0600 Message-ID: From: Kurt Touet To: Garrett Cooper Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-current@freebsd.org" , Dan The Man Subject: Re: samba+zfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2011 23:12:34 -0000 On Wed, Nov 9, 2011 at 1:39 PM, Garrett Cooper wrote: > On Nov 8, 2011, at 11:07 PM, "Daniel O'Connor" wr= ote: > >> >> On 09/11/2011, at 17:32, Garrett Cooper wrote >>>> dd's of large files (spooled backups going to tape) to /dev/null are a= s slow as Samba. >>> >>> =A0 - Dedupe? >> >> Nope. >> >>> =A0 - Compression? >> >> On the mail spool & ports, but not on the tape spool. >> >>> =A0 - How much RAM? >> >> 8GB. >>> =A0 - What debug options do you have enabled in the kernel? >> >> It is 8.2-GENERIC so.. no WITNESS (for example) > > Ok. 8.2 release or stable? > >>> =A0 I've been noticing a slowdown in some respects with NFS/SMB, but I >>> suspected it was because I have an re(4) based NIC. ZFS has also wired >>> down a lot of my system memory for the L2ARC=85 >> >> >> re isn't great but I wouldn't expect it to slow down over time.. Unless = bounce buffers got used more and more or something. >> >> I have an em0 card in this system - but in any case it is slow locally (= i.e. dd a large file with 64k block size). > > =A0 =A0Good point. Simple base cases help isolate the root cause. That > being said, my disk speed(s) are a lot better than my network + samba > speeds (zfs:store is mfid0 backed with write cache enabled; zfs:sac is > a single ada(4) backed disk with write cache enabled -- err... it > shouldn't be like that), but I suspect that's misconfiguration on my > part: > > $ sysctl hw.model hw.physmem > hw.model: Intel(R) Xeon(R) CPU =A0 =A0 =A0 =A0 =A0 W3520 =A0@ 2.67GHz > hw.physmem: 12863094784 > $ sudo mfiutil show volumes > mfi0 Volumes: > =A0Id =A0 =A0 Size =A0 =A0Level =A0 Stripe =A0State =A0 Cache =A0 Name > =A0mfid0 ( 1860G) RAID-6 =A0 =A0 =A064k OPTIMAL Enabled =A0 > $ zpool status > =A0pool: sac > =A0state: ONLINE > =A0scan: none requested > config: > > =A0 =A0 =A0 =A0NAME =A0 =A0 =A0 =A0STATE =A0 =A0 READ WRITE CKSUM > =A0 =A0 =A0 =A0sac =A0 =A0 =A0 =A0 ONLINE =A0 =A0 =A0 0 =A0 =A0 0 =A0 =A0= 0 > =A0 =A0 =A0 =A0 =A0ada0p3 =A0 =A0ONLINE =A0 =A0 =A0 0 =A0 =A0 0 =A0 =A0 0 > > errors: No known data errors > > =A0pool: store > =A0state: ONLINE > =A0scan: scrub repaired 0 in 10h9m with 0 errors on Mon Nov =A07 18:58:01= 2011 > config: > > =A0 =A0 =A0 =A0NAME =A0 =A0 =A0 =A0STATE =A0 =A0 READ WRITE CKSUM > =A0 =A0 =A0 =A0store =A0 =A0 =A0 ONLINE =A0 =A0 =A0 0 =A0 =A0 0 =A0 =A0 0 > =A0 =A0 =A0 =A0 =A0mfid0p1 =A0 ONLINE =A0 =A0 =A0 0 =A0 =A0 0 =A0 =A0 0 > > errors: No known data errors > $ zfs list -o name,mountpoint,atime,sync,compression,dedup > NAME =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 MOUNTPOINT =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0ATIME =A0 =A0 =A0SYNC > =A0COMPRESS =A0 =A0 =A0 =A0 =A0DEDUP > sac =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0legacy =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 on =A0standard > =A0 =A0 =A0off =A0 =A0 =A0 =A0 =A0 =A0off > sac/root =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 / =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0on =A0standard > =A0 =A0 =A0off =A0 =A0 =A0 =A0 =A0 =A0off > sac/scratch =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/scratch =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 on =A0standard > =A0 =A0 =A0off =A0 =A0 =A0 =A0 =A0 =A0off > sac/scratch/freenas =A0 =A0 =A0 =A0 =A0/scratch/freenas =A0 =A0 =A0 =A0 = =A0 =A0off =A0standard > =A0 =A0 =A0 on =A0 =A0 =A0 =A0 =A0 =A0off > sac/scratch/freenas/FreeBSD =A0/scratch/freenas/FreeBSD =A0 =A0off =A0sta= ndard > =A0 =A0 =A0 on =A0 =A0 =A0 =A0 =A0 =A0off > sac/usr =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/usr =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 on =A0standard > =A0 =A0 =A0off =A0 =A0 =A0 =A0 =A0 =A0off > sac/var =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/var =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 on =A0standard > =A0 =A0 =A0off =A0 =A0 =A0 =A0 =A0 =A0off > store =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/store =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 on =A0standard > =A0 =A0 =A0off =A0 =A0 =A0 =A0 =A0 =A0off > store/freebsd =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/store/freebsd =A0 =A0 =A0 = =A0 =A0 =A0 =A0 on =A0standard > =A0 =A0 =A0 on =A0 =A0 =A0 =A0 =A0 =A0 on > store/home =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /usr/home =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0on =A0standard > =A0 =A0 =A0off =A0 =A0 =A0 =A0 =A0 =A0off > $ dd if=3D/dev/zero of=3Dfoo bs=3D1m count=3D1024 > 1024+0 records out > 1073741824 bytes transferred in 13.426620 secs (79971119 bytes/sec) > $ cd /store > $ dd if=3D/dev/zero of=3Dfoo bs=3D1m count=3D1024 > 1024+0 records in > 1024+0 records out > 1073741824 bytes transferred in 7.565117 secs (141933276 bytes/sec) > $ cat /usr/local/etc/smb.conf > [global] > =A0 =A0 =A0 =A0workgroup =3D WORKGROUP > =A0 =A0 =A0 =A0server string =3D BAYONETTA > =A0 =A0 =A0 =A0security =3D user > =A0 =A0 =A0 =A0load printers =3D no > =A0 =A0 =A0 =A0max log size =3D 50 > =A0 =A0 =A0 =A0preferred master =3D yes > =A0 =A0 =A0 =A0local master =3D yes > =A0 =A0 =A0 =A0socket options =3D SO_RCVBUF=3D16384 SO_SNDBUF=3D16384 > =A0 =A0 =A0 =A0nt acl support =3D yes > =A0 =A0 =A0 =A0inherit acls =3D yes > =A0 =A0 =A0 =A0map acl inherit =3D yes > =A0 =A0 =A0 =A0aio read size =3D 16384 > =A0 =A0 =A0 =A0aio write size =3D 16384 > > [scratch] > =A0 =A0 =A0 =A0path =3D /scratch > =A0 =A0 =A0 =A0writeable =3D yes > > [store] > =A0 =A0 =A0 =A0path =3D /store > =A0 =A0 =A0 =A0writeable =3D yes > $ > > =A0 =A0I'll have to: > =A0 =A01. Recheck what Windows 7 says when transferring out to my box > with a large file. > =A0 =A02. Use nc to quickly measure network performance. > =A0 =A03. Try transferring over NFS with both my Macbook and setup > FreeBSD or Linux on the other workstation for testing out NFS > transfers (64kB rsize/wsize of course). Wash, rinse, repeat with > samba. > =A0 =A0The last I remember the transfer speeds were pitiful with samba36 > (somewhere around 45MBps to my 'store' zpool). I've been conservative > with the socket settings, but it might be time to bump that up along > with the mbuf cluster count (for some odd reason I haven't changed it > from the system default), reboot, and retest. > Thanks, > -Garrett > I have found the source of my speed issues, and they are not tied to samba or zfs. The replacement drive that I put into my array (just after I updated to stable/9 a few weeks ago) is hitting 100% busy in gstat while only writing out1-3MB/s -- it's a WDC WD15EARS-00Z5B1 and some quick googling has demonstrated that there are issues with drives like it.