From owner-freebsd-fs@freebsd.org Mon Aug 3 22:20:12 2020 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16B173A88F6 for ; Mon, 3 Aug 2020 22:20:12 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BLC4W0VNbz4SX8 for ; Mon, 3 Aug 2020 22:20:10 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from venus.yoonka.com ([10.70.7.24]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id 073MK3Nh035743 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Mon, 3 Aug 2020 22:20:03 GMT (envelope-from list1@gjunka.com) X-Authentication-Warning: msa1.earth.yoonka.com: Host [10.70.7.24] claimed to be venus.yoonka.com Subject: Re: zfs scrub enable by default To: freebsd-fs@freebsd.org References: <24edb075-155c-439d-1ef5-541893036429@freebsd.org> <0d1d14c9-64ba-368c-b2f4-56efa741cc5e@inbox.lv> From: Grzegorz Junka Message-ID: Date: Mon, 3 Aug 2020 22:20:03 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <0d1d14c9-64ba-368c-b2f4-56efa741cc5e@inbox.lv> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4BLC4W0VNbz4SX8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Spamd-Result: default: False [-2.02 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:88.98.225.149]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; HAS_XAW(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.90)[-0.903]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_SHORT(0.02)[0.019]; DMARC_NA(0.00)[gjunka.com]; NEURAL_HAM_MEDIUM(-0.84)[-0.837]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:56478, ipnet:88.98.192.0/18, country:GB]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2020 22:20:12 -0000 On 03/08/2020 21:41, John Long via freebsd-fs wrote: > On 03/08/2020 20:25, Allan Jude wrote: >> On 2020-08-03 12:10, Steve Wills wrote: >>> Hi, >>> >>> I wonder why we don't enable zfs periodic scrub by default? >>> >>> https://svnweb.freebsd.org/base/head/usr.sbin/periodic/periodic.conf?view=markup#l162 >>> >>> >>> >>> Anyone happen to know? >>> >>> Thanks, >>> Steve >>> >>> _______________________________________________ >>> freebsd-fs@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs >>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >> >> I think switching this to on-by-default is a good thing. >> >> To be clear, which the check is part of 'periodic daily', it only >> triggers a scrub if it has been more than 35 days since the last scrub. >> >> FreeNAS already has does this, and that accounts for a large number of >> FreeBSD ZFS deployments. > > There is a difference. FreeNAS is an appliance. It should minimize the > need for management. > > FreeBSD is the base OS. It should do as little as possible so people > can set it up the way we want rather than spend days or weeks > unbreaking surprising, non-standard behavior and hundreds of tweaks > for everybody who requested them. > >> There is tuning you can do in ZFS to try to lessen the impact of a scrub >> on your production workloads. > > That's up to the guy running the box to do or not to do. > >> The periodic script lets you select which pools to include (defaults to >> all), so you can tune it to only scrub your root pool every 35 days, and >> not the large pool that might take too long to scrub or whatever. It >> also lets you set a different threshold for each pool. > > A NAS appliance could benefit from something like this. A generic OS > cannot. > >> So I don't see any reason not to enable it by default, and just document >> how to adjust it if people really need to disable it. Honestly, I think >> those who are disabling it are doing themselves a disservice. > > It's offensive for you to presume to think you know better what the > other guy needs than he does himself. Thank you for clarifying it > though, I think it's valuable to understand the thinking of people who > want to coopt the OS into their personal playground. > Thanks John, I couldn't agree more. If I wanted to let my OS decide what's better for me I would run my server on Windows or Mac. That having said, FreeBSD does come with a few nice defaults that I wouldn't know how to set up myself otherwise. For example, once the sendmail is configured it automatically sends daily weekly and monthly health reports for the host and all jails, including disk usage, configuration changes, security checks, cleaning runs, failed su login attempts, etc. One might say they are similar to the scrubbing, i.e. if I don't configure sendmail the system will be collecting them in the host's mailbox eventually potentially impacting the server. I am not advocating for making scrub the default, just pointing out that FreeBSD does come with some potentially impacting defaults already. GrzegorzJ