From nobody Mon Aug 28 14:23:09 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RZCTr0FM0z4rbpl for ; Mon, 28 Aug 2023 14:23:44 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZCTq5QJZz4PpS for ; Mon, 28 Aug 2023 14:23:43 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-59209b12c50so41041817b3.0 for ; Mon, 28 Aug 2023 07:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693232623; x=1693837423; h=content-transfer-encoding:in-reply-to:subject:from:references:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=bcaQztgjGiI9jFRcxpfVWyGgTE3gJulqvDPB0a4U2eI=; b=JyB3S7qItIaBhke5rfnfasBZAzjmQKD9uWYTaRACKNxRYLXguw6lLdW9HMG6+UAbbw Nxa/vdx6jilXf+FySU2LWpiJPs/7MyRQHErzqgIFPWSyUzyPaoF9tchf2OcsaIgBgw+n BfIeMyqE56shE/H8KPMAQJykurTN73oMjOuSkSlENEstkoNc4lkVryrEF3IWbT5oFYdb ecSANAr35PatMUvzkxH/iQsXsogwIQy+22iJrtKGMliz4I1+30PtRLvKAmma6UrmMOBB DQ+CC6bvgz+w8zKdXiAjAxwJ6dmO62TNLpROMYe1Z+SlEtvqYwzOQlYsbQQoQT1Zw5V/ hadQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693232623; x=1693837423; h=content-transfer-encoding:in-reply-to:subject:from:references:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bcaQztgjGiI9jFRcxpfVWyGgTE3gJulqvDPB0a4U2eI=; b=JqZJFM6SiEM/kXTFmHRvlF0ITP1PfQ/vAE1lMF/BH2YXCA/oCXcRxf207XOe0e4n/t 3Nz1UkHOMKIYloy6wU9czCHB2vrifbqygKIZzfXHpJtYfCpN5gWEH+D1x8413yPt1gHV l2TMbRMjtvlUgJ+XcUvECVLUM4eq0wZH9Bs1ZwViTi+BNsYoYzXA7ZYm2XnfSiIPYGiA GcWV7NiSGguHfl67c5mVpd5JxkQ2KUPiSXX+Gw5+UNLX/li9GHrv5tMYEAJn2BV0V06s T6rH4mAmuumLBvI62H/RYUl68JPkDhz990xj/DgtjdJIEYOIsBrq6auvVM8Pii+XH+Y7 T0sw== X-Gm-Message-State: AOJu0Yww+Nfkp1aHvKa2LSSex/NRkiIkvHZOyjR3PpKaBbnAHYfSRLhW UOsTepFmS0tTiq4ICintaMFi3b+ataI= X-Google-Smtp-Source: AGHT+IHTKZx0n1r7FX+0uYI3HcqDHg8d4r1FhT5xPAJ4L9v1koz7DRAdQ+W0ohq9KZpsNnbvaImyjg== X-Received: by 2002:a0d:cc93:0:b0:583:9c78:9a84 with SMTP id o141-20020a0dcc93000000b005839c789a84mr28440542ywd.43.1693232622932; Mon, 28 Aug 2023 07:23:42 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id u139-20020a818491000000b00583b40d907esm2177456ywf.16.2023.08.28.07.23.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Aug 2023 07:23:42 -0700 (PDT) Message-ID: Date: Mon, 28 Aug 2023 10:23:09 -0400 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Pete Wright , freebsd-current@freebsd.org References: From: Alexander Motin Subject: Re: zfs autotrim default to off now In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RZCTq5QJZz4PpS Hi Pete, On 27.08.2023 23:34, Pete Wright wrote: > looking at a recent pull of CURRENT i'm noticing this in the git logs: > > #15079 set autotrim default to 'off' everywhere > > which references this openzfs PR: > https://github.com/openzfs/zfs/pull/15079 > > > looking at the PR i'm not seeing a reference to a bug report or anything, is > anyone able to point me to a bug report for this. it seems like a pretty major > issue: > "As it turns out having autotrim default to 'on' on FreeBSD never really worked > due to mess with defines where userland and kernel module were getting different > default values (userland was defaulting to 'off', module was thinking it's > 'on')." > > i'd just like to make sure i better understand the issue and can see if my > systems are impacted. You are probably misinterpreting the quote. There is nothing wrong with the autotrim itself, assuming your specific devices properly handle it. It is just saying that setting it to "on" by default on FreeBSD, that was done to keep pre-OpenZFS behavior, appeared broken for a while. So that commit merely confirmed the status quo. It should not affect any already existing pools. On a new pool creation the default is now officially "off", matching OpenZFS on other platforms, but there is no reason why you can not set it to "on", if it is beneficial for your devices and workloads. As alternative, for example, you may run trim manually from time to time during any low activity periods. -- Alexander Motin