From nobody Sun May 23 18:59:16 2021 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 ED4C09F3ABA for ; Sun, 23 May 2021 18:59:25 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fp8ld5DKgz3nCt for ; Sun, 23 May 2021 18:59:25 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 14NIxH3x017632 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 23 May 2021 11:59:17 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 14NIxGcK017631; Sun, 23 May 2021 11:59:16 -0700 (PDT) (envelope-from jmg) Date: Sun, 23 May 2021 11:59:16 -0700 From: John-Mark Gurney To: Michael Gmelin Cc: tech-lists , freebsd-current@freebsd.org Subject: Re: tuning a zfs-mounted /var Message-ID: <20210523185916.GM14975@funkthat.com> Mail-Followup-To: Michael Gmelin , tech-lists , freebsd-current@freebsd.org References: 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Sun, 23 May 2021 11:59:18 -0700 (PDT) X-Rspamd-Queue-Id: 4Fp8ld5DKgz3nCt X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Michael Gmelin wrote this message on Sat, May 22, 2021 at 21:13 +0200: > > On 22. May 2021, at 20:32, tech-lists wrote: > > > > ???Hi, > > > > What options could one pass to zfs to speed it up to characteristics > > favourable to what's usually in /var ? Like lots of fast writes, lots of > > files smaller than what's on /usr, lots of file creation and deletion > > but also quite a few files that might become large, like what's in > > /var/log, things like that. > > > > Make sure your pool (or at least the /var file system) has compression=lz4 and that atime is off, beyond that I wouldn???t bother to try to optimize manually there, unless you run a database like MySQL in /var/db/???, in which case setting a fixed record size might make sense. And if you're running a db in /var, you should just create a new dataset for the database instead of reuse /var's dataset, that way the fixed record size does not cause problems for the rest of /var... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."