From nobody Mon Aug 28 17:56:33 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 4RZJCW0blhz4rngq for ; Mon, 28 Aug 2023 17:56:39 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [66.165.241.226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.nomadlogic.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RZJCV4JjHz3SV4; Mon, 28 Aug 2023 17:56:38 +0000 (UTC) (envelope-from pete@nomadlogic.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nomadlogic.org; s=04242021; t=1693245394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=85n7Hbmh9puF9h2RVeHW3Q0OdLmdOtY79Mu6FZk4enU=; b=DEx3xGEjASFUJzqblonGdAzIPBUvl1uyB3eTEo9eDFavJVSFXCtDTjXCgaH8CahidlusA4 5SrQ813wCmYaUjQsdQYjs3zvtnQ9hpPlKdQcW6OepsimONokcPZCIhT96SKEXp0PoS6hIl Nh30q/m/2XqN85gwWV+zutIxFDynVfg= Received: from [192.168.1.160] (cpe-24-24-168-214.socal.res.rr.com [24.24.168.214]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id a6c1544f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 28 Aug 2023 17:56:33 +0000 (UTC) Message-ID: Date: Mon, 28 Aug 2023 10:56:33 -0700 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.14.0 Subject: Re: zfs autotrim default to off now To: Alexander Motin , freebsd-current@freebsd.org References: Content-Language: en-US From: Pete Wright In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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:29802, ipnet:66.165.240.0/22, country:US] X-Rspamd-Queue-Id: 4RZJCV4JjHz3SV4 On 8/28/23 07:23, Alexander Motin wrote: > 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. > OK I think that makes sense. So to be clear, if we were using the default autotrim=enabled behavior we in fact weren't having our SSDs trimmed? I think that's my concern, as an admin I was under the impression that it was enabled by default but apparently that wasn't actually happening. -pete -- Pete Wright pete@nomadlogic.org @nomadlogicLA