From owner-freebsd-hackers@freebsd.org Sun Dec 2 03:47:02 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D52A6130EA4D for ; Sun, 2 Dec 2018 03:47:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 380CE81734 for ; Sun, 2 Dec 2018 03:47:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id p17so10301292qtl.5 for ; Sat, 01 Dec 2018 19:47:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5KxctOa3r6paCj6a+BTn1NOTRpSAqcW1nSaWHy2b+6E=; b=Ykv2nFVLi0csQaWiHCkBsnMOLPo/+l6hSBM9NqJMtlnn+iMZwZxhay2sE0KW/0GugE 9txUB1h5SZs0ooWFyKfV3cvYjhL86bNsUI23o2NCGkvNPq7efcF2WJIbHM0xKc4l5z2g 6AIjHOO68FMdqaHXRZJfgNS1qpaHe+0PGA+9MNMmuI0uJyFTHg7SwTagUUUtTSmJ0x6g kCCOk90ndkamrUSGamP11QCuHSBJCWNPf9fAlaSUZAViy2sqdp6ieQkOS3OoF/Gyn7u5 459emvgVZdaCVUjL+UwN57uFuBXm2Xd7bzSDb6i/NrDPPm6wqKIWeWEypQQVRWw36Q36 QHmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5KxctOa3r6paCj6a+BTn1NOTRpSAqcW1nSaWHy2b+6E=; b=k0q7JqCVv3kEoK5JUEXev3LW9/I5fe2SLBPbsMV1kvPCd6f5lcxv5/yQvPqIEuAqSg S/RQSFCvSXt7on4sEpH88awfQRZm6+jFB4d29UH9wITp0wtsiQnTYQIXThAF+reQ+7Tc L9F86V0n5YL/nxBt7vFwgAiySdZlNqaUho81JJvuAMOm2e7qwGDKnzDNhSv1sXg3gGhp qkkexSI5fYRQSviX8J6/NZuFefDvOWtxSrB3WCH1clrGQe7kk7QKKITAXONmaLkagL6v zd+8k3lzfKa1kZCvHlVFJcDrfJf+8+s0iM9tUGcP1Q/+mYOsOxqQkpM9D2YcQztR6qa6 mUuA== X-Gm-Message-State: AA+aEWZKaUgQoOajBs6cBSiimldi6SEZqpjSLQ/PQX23mzMUKpG/OC12 0D/tHZmmKksuWTsvJji4rMAp/9p1owLNJ6yzQsxsTw== X-Google-Smtp-Source: AFSGD/UMwrfIduM+DGwIclqdqUbIxTQnoTrZWmpJQqQYWct84MKX+n7n8C9KhvvQu6djcP2VaQyaA9IQuHSa+40ockk= X-Received: by 2002:ac8:668c:: with SMTP id d12mr10591596qtp.242.1543722420501; Sat, 01 Dec 2018 19:47:00 -0800 (PST) MIME-Version: 1.0 References: <7e69211c-6ffb-6155-b17a-a845c0b3586d@grosbein.net> <20181201.093153.893601099798031027.ish@amail.plala.or.jp> <1c7139bd-258c-e7d2-2572-052da3803b3b@freebsd.org> <20181201.202332.546134930481017424.ish@amail.plala.or.jp> <12404.1543699424@critter.freebsd.dk> <20181201222424.0ae8abfd@gumby.homeunix.com> <1177.1543704042@critter.freebsd.dk> In-Reply-To: <1177.1543704042@critter.freebsd.dk> From: Warner Losh Date: Sat, 1 Dec 2018 20:46:49 -0700 Message-ID: Subject: Re: How to use trim command ?,Re: How to use trim command ? To: Poul-Henning Kamp Cc: RW , FreeBSD Hackers X-Rspamd-Queue-Id: 380CE81734 X-Spamd-Result: default: False [-2.28 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.94)[-0.943,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_LONG(-0.91)[-0.914,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[6.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.80)[-0.798,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-0.62)[ipnet: 2607:f8b0::/32(-1.69), asn: 15169(-1.30), country: US(-0.09)]; FREEMAIL_CC(0.00)[googlemail.com] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2018 03:47:02 -0000 On Sat, Dec 1, 2018, 3:43 PM Poul-Henning Kamp -------- > In message <20181201222424.0ae8abfd@gumby.homeunix.com>, RW via > freebsd-hackers writes: > >On Sat, 01 Dec 2018 21:23:44 +0000 > > >> Why would you run 'fsck_ffs -E' in cron anyway ? > >> > >> If the file-system is has TRIM enabled, it would be a no-op, unless > >> there are bugs in the fs ? > > > >There's a school of thought that trimming in real-time, after file > >deletion, slows down I/O on the device. > > I suspect people would have reached that conclusion back when various > shady outfits started selling camera-grade FAL devices in 2.5" > form-factor. > > My advice would be to avoid any device where that pattern is observed, > because that means there is too few write buffers and paths. > Erase has become super expensive with QLC nand. And many SSDs are trying to use simpler, smaller data structures to implement its LUTs. This makes trims too expensive. There are also others that can do some trims w/o any hassles, but if you trim 5s or 10s of gig at a time, it causes issues. Then metering the trims out helps a lot... but it is very workload specific... Warner -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >