From owner-freebsd-current@FreeBSD.ORG Fri Apr 17 01:32:48 2009 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 848C31065675 for ; Fri, 17 Apr 2009 01:32:48 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from mail.wanderview.com (mail.wanderview.com [66.92.166.102]) by mx1.freebsd.org (Postfix) with ESMTP id 283CC8FC08 for ; Fri, 17 Apr 2009 01:32:47 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from harkness.in.wanderview.com (harkness.in.wanderview.com [10.76.10.150]) (authenticated bits=0) by mail.wanderview.com (8.14.3/8.14.3) with ESMTP id n3H1WjUm033207 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 17 Apr 2009 01:32:45 GMT (envelope-from ben@wanderview.com) Message-Id: From: Ben Kelly To: Peter Schuller In-Reply-To: <20090416132302.GA86096@hyperion.scode.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 16 Apr 2009 21:32:45 -0400 References: <49C2CFF6.8070608@egr.msu.edu> <08D7DC2A-68BE-47B6-8D5D-5DE6B48F87E5@wanderview.com> <20090416132302.GA86096@hyperion.scode.org> X-Mailer: Apple Mail (2.930.3) X-Spam-Score: -1.44 () ALL_TRUSTED,AWL X-Scanned-By: MIMEDefang 2.64 on 10.76.20.1 Cc: freebsd-current@freebsd.org, Artem Belevich Subject: Re: [patch] zfs livelock and thread priorities 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: Fri, 17 Apr 2009 01:32:48 -0000 On Apr 16, 2009, at 9:23 AM, Peter Schuller wrote: >> BTW, now that you're tinkering with ZFS threads and priorities, >> whould >> you by any chance have any idea why zfs scrub is so painfully slow on >> -current? >> When I start scrub on my -stable box, it pretty much runs full speed >> -- I can see disks under load all the time. >> However on -current scrub seems to run in small bursts. Disks get >> busy >> for a second or so and then things get quiet for about five seconds >> or >> so and this pattern repeats over and over. > > This is intentional. The newer ZFS code has, if I remember correctly, > something like "spend at most 1/5 of the time doing scrub for each > underlying vdev". I could be wrong on the details and I don't have > source refs off-hand, by I looked into this when I wanted to see if I > could tweak this (while I definitely like it rate limited, I would > have liked to up the threshold a bit). My conclusion at the time was > that there was no way to tweak it other than recompiling the kernel. I find it odd that they would pause for up to 5 seconds, though. I would expect the throttling to occur over a much smaller time span. Do you see similarly large pauses in disk I/O during a scrub? - Ben