From nobody Sun Oct 15 16:43:23 2023 X-Original-To: freebsd-hackers@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 4S7mK66mrVz4x8s5 for ; Sun, 15 Oct 2023 16:43:38 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) (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 4S7mK54Kyhz4RkB for ; Sun, 15 Oct 2023 16:43:37 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.221.172 as permitted sender) smtp.mailfrom=asomers@gmail.com; dmarc=none Received: by mail-vk1-f172.google.com with SMTP id 71dfb90a1353d-49d0f24a815so1613613e0c.2 for ; Sun, 15 Oct 2023 09:43:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697388215; x=1697993015; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1eMsyZx20nPHSaPWYNWZzhG1kHxfY6FLdRtvEELb69g=; b=ml4V+BjX3E6U7N5JlzIbh9zGhDACTEC7vi5zxxALYWD6aXvTHMrcXp4G+8oc24diSs XhJN0Rv3cv/+dZ+xm03k8RfD2hUe3LcYgxfb0MgoDjZr0/bV5qVNUDnbbH2bCRZaMlL9 J917tGRTHTas1d9PgIA2ZONVzV46gI9aPGbqvcKt+P3uNxBMu4HNSzmf7wgm8wXXPT/Y XsXY1h86zcJYNGoRbnfEg4sgwlnskd2u1mmYwH6maVwdzYGBSbncRYKNcFe0T2eNiHNv hZw5EAvyGLjPmFs3ra7WawSmIMGSGXlIZN0dcbfnqjBe1JmzBZoAk/kpGGEdCukBT+aI Eeww== X-Gm-Message-State: AOJu0YxXk83jYstkcJ7uMjEAm//S0jku/sWuhDj5IsQjztYy4gDd15vt KzA4hrzF+OWAiI3dKSKfbvO/sjzT4RPmhDCeOd9U2N5w X-Google-Smtp-Source: AGHT+IF7MnG8Zm2IRkGbCyLj3MSdmILq34T8c3pu6b3dyj152gf88G/OA5oCcW2drRSYYGoT7VDFnGGrNCndkbdwEUE= X-Received: by 2002:a05:6122:1d4b:b0:4a8:4218:7b90 with SMTP id gd11-20020a0561221d4b00b004a842187b90mr839875vkb.9.1697388215144; Sun, 15 Oct 2023 09:43:35 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Sun, 15 Oct 2023 09:43:23 -0700 Message-ID: Subject: Re: zpool geli encryption question To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: - X-Spamd-Result: default: False [-1.13 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.968]; NEURAL_SPAM_MEDIUM(0.84)[0.839]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.172:from]; BLOCKLISTDE_FAIL(0.00)[209.85.221.172:server fail]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[asomers]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.172:from] X-Rspamd-Queue-Id: 4S7mK54Kyhz4RkB On Sun, Oct 15, 2023 at 9:39=E2=80=AFAM void wrote: > > On Sun, Oct 15, 2023 at 07:17:57AM -0700, Alan Somers wrote: > > >How much of the FreeBSD VM's disk is actually in-use? > > (in the example below, another vm instance, same observation) > > from the host: > > NAME USED AVAIL REFER MOUNTPOINT > ssdzfs/fbsd140Rv1 97.5G 309G 21.3G - > > within the booted vm: > > NAME AVAIL USED USEDSNAP USEDDS USEDREFRESERV USEDCH= ILD > zroot 74.8G 9.97G 0B 96K 0B 9.= 97G > zroot/ROOT 74.8G 4.61G 0B 96K 0B 4.= 61G > zroot/ROOT/default 74.8G 4.61G 0B 4.61G 0B = 0B > zroot/home 74.8G 59.6M 0B 59.6M 0B = 0B > zroot/tmp 74.8G 120K 0B 120K 0B = 0B > zroot/usr 74.8G 5.28G 0B 96K 0B 5.= 28G > zroot/usr/ports 74.8G 5.28G 0B 5.28G 0B = 0B > zroot/usr/src 74.8G 96K 0B 96K 0B = 0B > zroot/var 74.8G 1.17M 0B 96K 0B 1.= 08M > zroot/var/audit 74.8G 96K 0B 96K 0B = 0B > zroot/var/crash 74.8G 96K 0B 96K 0B = 0B > zroot/var/log 74.8G 564K 0B 564K 0B = 0B > zroot/var/mail 74.8G 252K 0B 252K 0B = 0B > zroot/var/tmp 74.8G 96K 0B 96K 0B = 0B > > gzipped archive: > > -rw-r--r-- 1 root wheel 21G 15 Oct 16:39 2023.10.15_15:57.fbsd140Rv1.= gz > > >Maybe you are using TRIM with FreeBSD, which punches holes in the host's= ZFS > >storage. > > On the bhyve host (14.0-BETA3 #0 releng/14.0-n265111) > > vfs.zfs.vdev.trim_min_active: 1 > vfs.zfs.vdev.trim_max_active: 2 > vfs.zfs.trim.queue_limit: 10 > vfs.zfs.trim.txg_batch: 32 > vfs.zfs.trim.metaslab_skip: 0 > vfs.zfs.trim.extent_bytes_min: 32768 > vfs.zfs.trim.extent_bytes_max: 134217728 > vfs.zfs.l2arc.trim_ahead: 0 > vfs.ffs.dotrimcons: 1 > > Does this mean trim is enabled and active on the host? > I didn't set it. Maybe it was automatically set because zfs knows the > hardware is SSD? Within the VM, do "zpool get autotrim zroot" to see if it's set. You can also manually trim with "zpool trim zroot" if you don't want to use the autotrim setting. Note that even without trim, it's possible that there are LBAs which the VM simply has never written to. That could also explain the low space usage on the host. > > > That would explain why compression seems to save space, even > > though the data is encrypted. > > That's really smart. > > TYVM for the explainer. > -- > >