From owner-freebsd-fs@freebsd.org Wed Apr 27 20:45:02 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11483B1EDB8 for ; Wed, 27 Apr 2016 20:45:02 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A471312B0 for ; Wed, 27 Apr 2016 20:45:01 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x234.google.com with SMTP id g17so9425097wme.1 for ; Wed, 27 Apr 2016 13:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=84IL+hH2Bn1ajkNcuqNMclwwB8Qs665DsTJGgHa2OGE=; b=o3vw9+exErOisJeIy1L5CckI5sau2QWhpS6cB5JkIX0RIqR9SrWtMNz27llSP5eqAE tr+1ST9hP6j5+Soyvm13Q5L8dmz/OvPymA1T3uVYERFKFN9bZE1cGpNRdJqkCYhY8dfT X7m60+1JUdWecQXgsjYa2TrZARC8wvBcYb/oES0mcHPp/ZSyE4B3Xz+Ku79S6ZVk5taw FUi9xoy+EEUFwWmfDXL+Lo8VlGj5Qsh3JgvJqss4asP+d881vw9QaKJ5T6PoT0sR85WG URnwSQuvyis4Ddu35P80h2g4/1WWpoXNOvOlJVhffycJQsmv27QYe020gWWUTV2cQy7T JwMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=84IL+hH2Bn1ajkNcuqNMclwwB8Qs665DsTJGgHa2OGE=; b=FgAiiqnrjLBsPneh1I/Z3ut9N15FoBLUDjXQIP4zU/CNUSTE1gOet+67brKbwl03IF xYON74cSTQiS0JXrWljWti+ujl2NgvzMOS/FEMjHXcYL1LNmBeOP7kiN75afZlA6W74a qAvy2dYH0MNoIWv+ADuo7o1VRsn0YpqNH5FKAbc+oZoJzfkrVU9vKWmHLNQYj2SrcGDB VzJ5LXuO1p/HOxMIWov6YLv4uANfc/mNdaINhrgkHF5P1qoc03I1YMu/r6Dgq3mRyAI4 ORer8gD2O/mKy0nc/5go4VFFUld+ApdvPd9hSegAvGMYtTKzZpmTMg2BFjvvDgTuYk8L pNGw== X-Gm-Message-State: AOPr4FVxW0hJ91crkRjSm1C5R8W+B6gfmowr/7fbJtX85O6R5KejnViZm5++/s3iPTprYGGC X-Received: by 10.194.107.74 with SMTP id ha10mr11422779wjb.24.1461789899936; Wed, 27 Apr 2016 13:44:59 -0700 (PDT) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id ju3sm5910831wjb.11.2016.04.27.13.44.58 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 13:44:58 -0700 (PDT) Subject: Re: How to speed up slow zpool scrub? To: freebsd-fs@freebsd.org References: <698816653.2698619.1461685653634.JavaMail.yahoo.ref@mail.yahoo.com> <698816653.2698619.1461685653634.JavaMail.yahoo@mail.yahoo.com> <571F9897.2070008@quip.cz> <571FEB34.7040305@andyit.com.au> <56C0A956-F134-4A8D-A8B6-B93DCA045BE4@pk1048.com> <084201d1a03e$d2158fe0$7640afa0$@andyit.com.au> <5720AAF8.4090900@quip.cz> <5720F890.3040600@platinum.linux.pl> <572100C9.8010606@quip.cz> <57211EFF.4000000@platinum.linux.pl> From: Steven Hartland Message-ID: <572124CC.6050808@multiplay.co.uk> Date: Wed, 27 Apr 2016 21:45:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <57211EFF.4000000@platinum.linux.pl> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2016 20:45:02 -0000 On 27/04/2016 21:20, Adam Nowacki wrote: > On 2016-04-27 20:11, Miroslav Lachman wrote: >> Adam Nowacki wrote on 04/27/2016 19:36: >>> On 2016-04-27 14:05, Miroslav Lachman wrote: >>>> Thank you for output of your zpool scrub. It is definitely faster than >>>> mine. >>>> >>>> To: Paul pk1048 >>>> Mine scrub does not repair anything. Drives are OK (in SMART). >>>> CPU is about 70%-90% idle during scrub + rsync backup and drives are >>>> about 60%-70% busy according to iostat: >>>> >>>> root@kiwi ~/# iostat -x -w 10 ada0 ada1 ada2 ada3 >>>> device r/s w/s kr/s kw/s qlen svc_t %b >>>> ada0 121.8 16.6 602.1 526.9 3 9.2 52 >>>> ada1 122.2 16.5 606.9 528.5 4 9.8 54 >>>> ada2 117.0 14.6 601.7 524.9 2 11.3 60 >>>> ada3 120.6 13.5 610.1 491.3 0 11.4 61 >>>> >>>> I really don't know why it cannot go faster if nothing is loaded for >>>> 100%. >>> 1) zpool scrub is single threaded with prefetch, >> Hmm, this can be the cause. Does it mean that ZFS is faster on CPU with >> higher "per core" power and number of cores (threads) is not so >> important? (in this case of scrub) > No. Zpool scrub thread doesn't need much CPU time as disk I/O handling > (including decompression and checkums) happens in other threads. > >>> 2) some data blocks do not span all disks (metadata, small files, >>> compression) >>> End result is that zfs can't always read from all disks during scrub so >>> disk utilization is going to be less than 100% even when going at full >>> speed. >> Thank you for the explanation. > Try increasing vfs.zfs.top_maxinflight to 100 or more. > If your on a recent version vfs.zfs.vdev.scrub_max_active is usually the most pertinent change to make. Regards Steve